home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir42 / c7105.zip / CLARION.TXT < prev    next >
Text File  |  1994-03-02  |  208KB  |  5,410 lines

  1.  
  2. <<Global Settings>>
  3. <General Information>
  4.  
  5. The information you provide in the prompt fields on the
  6. Global Settings window are used throughout the application.
  7. These affect source code generation for the Global CODE
  8. section of the application, and the generated source code
  9. for all procedures.
  10.  
  11. <Property Fields>
  12. Property Fields
  13.  
  14. <  Enable Shared Files>
  15. [√] Enable Shared Files
  16.      Check this box to indicate that the application will
  17.      be used in a multi-user environment.  This could be a
  18.      Network, Multi- user operating system, or a single-user
  19.      Multi-tasking operating system.  When checked, all data
  20.      files in the application are OPENed in shared access
  21.      mode 42h (Read/Write Deny None) instead of exclusive
  22.      access mode 22h (Read/Write Deny Write).
  23.  
  24. <  Enable Mouse Support>
  25. [√] Enable Mouse Support
  26.      Check this box to indicate that the application will
  27.      allow the user to use a mouse.  This places a
  28.      SETMOUSE(1,1) statement in the Global CODE section.
  29.  
  30. <  Enhanced Background?>
  31. [√] Enhanced Background?
  32.      Check this box to indicate that the application will
  33.      be run on an EGA, VGA, or SVGA monitor which allows the
  34.      Blink bit to be used as background color Enhance bit
  35.      (see SETNOBLINK in the Language Reference).
  36.  
  37. <  Close Unused Files?>
  38. [√] Close Unused Files?
  39.      Check this box to indicate that each procedure should
  40.      close the data files which it opens.  When this box is
  41.      checked, CheckOpen() is generated as a FUNCTION
  42.      returning one (1) if it actually opened the file, or
  43.      zero (0) if the file was already open or unable to be
  44.      opened.  If not checked, CheckOpen is generated as a
  45.      PROCEDURE.
  46.  
  47.      The return value from the CheckOpen() function is
  48.      saved in a local variable by each procedure.  That
  49.      saved value is checked just before RETURN to its
  50.      calling procedure -- if the procedure opened the file,
  51.      it also closes the file.
  52.  
  53. <  If File Not Found:>
  54. If File Not Found:
  55.      Select the action to take when the application
  56.      attempts to open a non-existing data file.
  57.  
  58.      () Create  -- Attempts to CREATE the file
  59.      () Halt -- Displays a warning then returns to DOS.
  60.  
  61.  
  62. <  Program Author:>
  63. Program Author:
  64.      Enter the programmer's name for documentation purposes.
  65.  
  66. <Embedded Source>
  67. Embedded Source
  68.  
  69. <  Inside Global MAP>
  70. "Inside Global MAP"
  71.      In the Global data section of the program at the end
  72.      of the MAP structure.  This may be used to declare any
  73.      Global procedure prototypes (or INCLUDE a file
  74.      containing them) that the Application Generator does
  75.      not automatically include in the MAP.
  76.  
  77. <  Before File Declarations >
  78. "Before File Declarations"
  79.      In the Global Data section of your program, after the
  80.      MAP and %GlobalData (Data declared in the Data Button
  81.      of Application Properties), and before the file
  82.      declarations. This source can be used to declare any
  83.      variables that you didn't desire to declare as part of
  84.      %GlobalData, or variables that don't need to be
  85.      visible in the Generator.  The placement of this
  86.      #EMBED allows the declarations made here to be visible
  87.      to your File Declarations.
  88.  
  89.      Example:  You have twenty files, each of which uses a
  90.                variable as the file location.  You could
  91.                either declare each variable in the Global
  92.                Data button, or use this EMBED to write one,
  93.                declaration, copy it 20 times, and make the
  94.                to the copies.
  95.  
  96. <  Data Section >
  97. "Data Section"
  98.      In the Global data section of the program after Global
  99.      data and all data file definitions.  This may be used
  100.      to declare any Global data which you may want to use
  101.      only in your embedded source code.
  102.  
  103. <  Setup Program>
  104. "Setup Program"
  105.      Immediately after the CODE statement.
  106.  
  107. <  Before Return to DOS>
  108. "Before Return to DOS"
  109.      After the call to the first procedure and immediately
  110.      before the RETURN statement which takes the user back
  111.      to DOS.
  112.  
  113.  
  114. <<The Batch Template>>
  115. <General Information>
  116.  
  117. The "Batch" template generates a procedure which will loop
  118. through a file and perform an operation on each record.
  119. This template is designed to allow changing or deleting a
  120. group of records with no hand coding.  However, there are
  121. many embedded source code points to give the programmer
  122. maximum flexibility.
  123.  
  124. CAUTION: It is a very good idea to make a backup copy of
  125. your data files before running a batch Change or Delete and
  126. NEVER test these procedures on live data without first
  127. making a backup.
  128.  
  129. <Formatter Support>
  130. Formatter Support
  131.  
  132. The Screen Formatter contains a default screen design
  133. containing two display fields, and Ok and Cancel buttons.
  134. The Pulldown Menu Formatter and Report Formatter are not
  135. supported.
  136.  
  137. <Property Fields>
  138. Property Fields
  139.  
  140. <  Range Limit Field>
  141. Range Limit Field:
  142.      The range of records to be processed can be limited by
  143.      fixing the value of a component of the primary file access
  144.      key. For example, line items on an invoice can be
  145.      limited to a single invoice.  The key for the item file
  146.      might contain ITM:Invoice and ITM:Line containing the
  147.      invoice number and line number of the item.
  148.  
  149.      ITM:Invoice would be the Range Limit Field, displaying only
  150.      those records for a fixed invoice number. The Range
  151.      Limit Field will be assigned the Range Value Field for
  152.      this limit.
  153.  
  154. <  Range Value Field>
  155. Range Value Field:
  156.      The Range Value Field is the field which holds the
  157.      value to be used as the limiting key component value.
  158.      The key component will be assigned this value.
  159.  
  160.      In this example, the current Invoice record might
  161.      contain the number of the invoice that is being
  162.      displayed.  INV:Number would be the Range Value Field,
  163.      supplying the value for the Range Limit Field.  The
  164.      Range Value Field must not be the same field as the
  165.      Range Limit Field.
  166.  
  167. <  Record Filter>
  168. Record Filter:
  169.       You may enter a record filter expression here. If
  170.       the Delete action is selected, and you enter
  171.  
  172.          CUS:State = 'FL'
  173.  
  174.      as the filter, then all customers with the state code
  175.      of 'FL' will be deleted.
  176.  
  177.      No validation is done on the code you enter -- an
  178.      invalid expression will generate compiler errors.  If
  179.      you are not familiar with the Clarion language
  180.      statements or expressions, do not use this entry --
  181.      use a Formula field with the FILTER Formula Class
  182.      instead.
  183.  
  184. <  Action for Batch>
  185. Action for Batch:
  186.      The batch process may either change or delete records.
  187.  
  188.      'Change' will PUT each selected record.
  189.      'Delete' will DELETE each selected record.
  190.      'No Action' will not PUT or DELETE the records.
  191.  
  192. <  Show Record Counter>
  193. Show Record Counter:
  194.      Check this box to display a record counter as the
  195.      records have been successfully changed or deleted.
  196.      Displaying a variable on screen within the main process
  197.      LOOP can slow the batch process slightly.  Therefore,
  198.      you may leave this check box blank and have no screen
  199.      updates within the LOOP.
  200.  
  201. <Embedded Source>
  202. Embedded Source
  203.  
  204. <  Data Section >
  205. "Data Section"
  206.      In the data section of the procedure after local data,
  207.      the screen and pulldown structures.  This may be used
  208.      to declare any data which you may want to use only in
  209.      your embedded source code.
  210.  
  211. <  Setup Procedure>
  212. "Setup Procedure"
  213.      Immediately after the CODE statement.
  214.  
  215. <  Setup Screen>
  216. "Setup Screen"
  217.       After the OPEN(Screen) statement.
  218.  
  219. <  Before file SET() >
  220. "Before file SET()"
  221.      Before the SET which will determine the file
  222.      processing order.  This embedded source is the ideal
  223.      place to fill key values for a multiple component key
  224.      SET.
  225.  
  226. <  Before LOOP >
  227. "Before LOOP"
  228.      After the SET command but before the main LOOP. At
  229.      this location you may override the SET statement, or
  230.      enter any LOOP setup code.
  231.  
  232. <  NEXT Record Error Check >
  233. "NEXT Record Error Check"
  234.      Immediately after the NEXT command. This allows a
  235.      check of the ERRORCODE() function to insure that there
  236.      were no errors.
  237.  
  238.      WARNING: If no error check is made here to allow a
  239.      BREAK out of the loop, you WILL get an infinite loop!
  240.  
  241. <  Within LOOP >
  242. "Within LOOP"
  243.      After the GET to any secondary files. This is the
  244.      heart of the processing LOOP.  If using a record
  245.      filter, this code may not always be executed if the
  246.      record is filtered out. If Many to 1 relationships
  247.      exist in the File Schematic, the lookups will have
  248.      already been done.  Any formulas created with the
  249.      formula formatter (except FILTER) will have been
  250.      executed just prior to this embedded source code.
  251.  
  252.      The next statement which executes after this code is
  253.      the PUT or DELETE of the record if Change or Delete has
  254.      been selected for this batch.
  255.  
  256. <  PUT/DELETE Record Error Check >
  257. "PUT/DELETE Record Error Check"
  258.      Immediately after the PUT or DELETE commands. This
  259.      allows a check of the ERRORCODE() function to insure
  260.      that there were no errors replacing a record.  If you
  261.      are changing fields which are the components of unique
  262.      keys, or if you are running this batch process on
  263.      shared files, you may enter your own error handling
  264.      scheme here.  If 'No Action' was selected for this
  265.      batch process, this embedded code window is not
  266.      needed.
  267.  
  268. <  End of Procedure >
  269. "End of Procedure"
  270.      Code placed in this window executes after all other
  271.      code in the procedure has executed.  At this point, the
  272.      Report is closed.  This code begins in column one,
  273.      therefore you may use this window to write any ROUTINEs
  274.      which are called from any other embedded source code
  275.      window.
  276.  
  277. <  When Screen Field is Selected : >
  278. "When Screen Field is Selected : "
  279.      In the CASE SELECTED() structure, executed when the
  280.      field is selected for entry.
  281.  
  282. <  When Screen Field is Completed: >
  283. "When Screen Field is Completed: "
  284.      In the CASE FIELD() structure, executed when the field
  285.      has been completed.
  286.  
  287. <Formula Classes>
  288. Formula Classes
  289.  
  290. <  FILTER >
  291. FILTER
  292.      A Conditional Field with "FILTER" in the Formula Class
  293.      field is used to select which records are processed.
  294.      If the Condition expression evaluates to zero (false)
  295.      for a given record, it is not processed.
  296.  
  297. <  No class (blank) >
  298. No class (blank)
  299.      Calculates the formula every time a record is
  300.      processed.
  301.  
  302.  
  303. <<The Browse Template>>
  304. <Brief Description >
  305. Brief Description
  306. ─────────────────
  307.  The "Browse" template uses a "List box" to display a
  308.  scrollable list of records.  The default Browse screen
  309.  has "Add", "Change" and "Delete" pushbuttons which call an
  310.  "Update" procedure to allow users to update a data file,
  311.  and a "Select" button to allow users to "Select" a
  312.  record from the list.  The "Select" button is dimmed
  313.  unless the Browse procedure is called as a "lookup" from
  314.  an entry field.
  315.  
  316. < Condensed Explanation of Prompts>
  317. Condensed Explanation of Prompts
  318. ┌──────────────────────┬─────────────────────────────────┐
  319. │Prompt                │      Explanation                │
  320. └──────────────────────┴─────────────────────────────────┘
  321.  
  322.  Module Name      :    Name of the .CLA source file where
  323.                        this procedure is generated.
  324.  
  325.  Range Limit Field :   Name a KEY field used to "limit" the
  326.                        records shown in the List box.  The
  327.                        field must be a component of the
  328.                        Browse "Access Key".  Records are
  329.                        included in the Browse if they have a
  330.                        KEY value which matches the value of
  331.                        this field.
  332.  
  333.  Range Value Field :   If you name a field here, then
  334.                        records are included in the Browse
  335.                        if the "Range Limit" field contains
  336.                        a value EQUAL to the "Range Value"
  337.                        field.
  338.  
  339.  Record Filter    :    Enter a valid Clarion language
  340.                        expression.  Record filters are used
  341.                        to Browse a subset of the data file.
  342.                        Each record from the data file will
  343.                        be evaluated against this expression
  344.                        for inclusion in this list.
  345.  
  346.  Locator Field    :    A Locator field is used to position
  347.                        the highlight bar to a particular
  348.                        section of the data file.  Name a
  349.                        KEY field component of the Browse
  350.                        "Access Key".  The Locator field
  351.                        should be placed on the Browse
  352.                        Screen as an Entry field AFTER the
  353.                        List box.  The closest match to this
  354.                        field is found after the user hits
  355.                        the TAB key.
  356.  
  357.                        *If your Locator field is a Numeric
  358.                        field, you should add the 'B'; to
  359.                        blank if zero, to the picture token.
  360.  
  361. [√] Incremental Locator : Check this box if you want the
  362.                           "Locator field" to be activated
  363.                           each time the user enters a
  364.                           keystroke.  The Locator remains
  365.                           active while the List box is
  366.                           selected. The "Locator" field MUST
  367.                           be placed AFTER the List box in
  368.                           the Field List.  Any user
  369.                           keystrokes are used to immediately
  370.                           seek the closest match in the data
  371.                           file, and re-position the
  372.                           highlight bar in the List box.
  373.  
  374.                        *If your Locator field is a Numeric
  375.                        field, you should add the 'B'; to
  376.                        blank if zero, to the picture token.
  377.  
  378.  Update Procedure :    Name a procedure that is called when
  379.                        the user hits the "Add", "Change",
  380.                        or "Delete" pushbuttons.
  381.  
  382. [√] Enable Hot Records  : Check this box if you want the
  383.                           Browse procedure to re-read the
  384.                           data file record every time the
  385.                           highlight bar is moved.  Use this
  386.                           option if you place data fields
  387.                           outside the List box.  For
  388.                           example you could use this option
  389.                           if you want to display a MEMO
  390.                           field for the highlighted record.
  391.  
  392.                           You can also use this option if
  393.                           you are using a Hotkey or
  394.                           Pushbutton to call another
  395.                           procedure, that acts upon the
  396.                           highlighted record.
  397.  
  398. [√] Enable Total Embeds : Check this box if you have used
  399.                           any of the following Embedded
  400.                           Source points to calculate
  401.                           totals from the data file:
  402.  
  403.                "Set to First Record Before Total Loop"
  404.                "Inside Total Loop, Immediately After Next()"
  405.                "Inside Total Loop, After Filter"
  406.  
  407.                           Code is generated to read the
  408.                           data file, and execute the
  409.                           embedded source code prior to
  410.                           the List box being displayed.
  411.  
  412.                           To keep the total accurate when a
  413.                           user ADDs, CHANGEs, or DELETEs a
  414.                           record, you also need to add code
  415.                           to the Embed points:
  416.  
  417.               "Prior to Update Procedure"
  418.               "After Update Procedure"
  419.  
  420. [√] Disable Memo Access : Check this box if the data file
  421.                           has a Memo field, and you are not
  422.                           displaying the Memo on the Browse
  423.                           screen. This improves performance
  424.                           when scrolling the List box.
  425.  
  426. <Detailed Description>
  427. Detailed Description
  428. ────────────────────
  429. The "Browse" template generates a procedure to display
  430. records from a data file in a List box.   Each line in the
  431. List box displays fields from one record of the data file.
  432. Each line in the List box can be scrolled left or right
  433. using the arrow keys or the List box horizontal scroll bar.
  434. Records are displayed in the List box in KEY order.   The
  435. KEY that is used is identified as the "Access Key"  on the
  436. File Schematic dialog (accessed by the "Files" pushbutton).
  437.  
  438. The List box isn't filled with records until it is selected.
  439. You can place Fields before the LIST box, but the first
  440. page of records isn't displayed until the List box is
  441. selected.
  442.  
  443. The "Insert", "Change", and "Delete" pushbuttons, or any
  444. other field that processes a record selected from the List
  445. box must be placed after the LIST box in the field list.
  446. To see the order Fields will be processed for your screen,
  447. enter the Screen Formatter and type Ctrl-F.
  448.  
  449. The "Select" button is activated if the Browse is called
  450. with KEYCODE() set equal to ShftEnter (Shift and Enter).
  451. KEYCODE() is set equal to ShftEnter when a Procedure is
  452. called from an entry field, from either "When Field is
  453. Selected" or "When Field is Completed", AND you have named
  454. a "Return Field".
  455.  
  456. <Detailed explanation of Prompts: >
  457. <  Range Limit Field: >
  458. Range Limit Field:
  459. ──────────────────
  460.      The "Range Limit" field allows a subset of the data
  461.      file to displayed in the List box.  The subset of
  462.      records is based on the value contained in the "Range
  463.      Limit" field.  The "Range Limit" field is a component
  464.      of the "Access Key".
  465.  
  466.      If you place the "Range Limit" field on the screen as
  467.      an entry field, it allows the user to assign the KEY
  468.      field a value and "limit" the records displayed.  If
  469.      you don't place the "Range Limit" field on the screen
  470.      you will have to provide a value for the "Range Limit"
  471.      in an Embedded Source point such as "Setup Screen".
  472.  
  473.      You can also use both "Range Limit" and "Range Value"
  474.      fields.  The value in the "Range Value" field is
  475.      assigned to the "Range Limit" field when the Browse
  476.      is started.
  477.  
  478. <    Example using a Range Limit as an Entry field:>
  479.      Example using a Range Limit as an Entry field:
  480.      ──────────────────────────────────────────────
  481.      If you have two files; INVOICE and ITEMS, and you want
  482.      to Browse all ITEMS for a selected INVOICE, you can
  483.      "limit" the records shown in the Browse of the ITEMS
  484.      file.
  485.  
  486.      If the Browse "Access Key" for the ITEMS file looks
  487.      like this:
  488.  
  489.               ITM:InvoiceKey        !Key for ITEMS file
  490.                  ├─ ITM:InvoiceNo   !Invoice Number
  491.                  └─ ITM:Line        !Line number on Invoice
  492.  
  493.      To "Browse" the ITEMS for a single Invoice, select
  494.      ITM:InvoiceNo as the "Range Limit" field.  Now place
  495.      ITM:InvoiceNo as an Entry field on the Browse screen
  496.      before the List box.  When the Browse is executed the
  497.      user can enter an Invoice number, and after hitting
  498.      the TAB key, the List box will be filled with ITEMS
  499.      for the Invoice number the user entered.
  500.  
  501.      If the Browse "Access Key" is a multi-component KEY,
  502.      and you want to use the entire KEY to limit the
  503.      Browse, select the last component of the KEY as the
  504.      "Range Limit" field.
  505.  
  506.      If you place all the KEY fields on the screen as entry
  507.      fields, the Browse can be "limited" by the user at
  508.      runtime.  Alternatively, you can use the embedded
  509.      source code window "Setup Screen", to prime the KEY
  510.      components.
  511.  
  512. <    Example of Range Limit using Embedded Source:>
  513.      Example of Range Limit using Embedded Source:
  514.      ─────────────────────────────────────────────
  515.  
  516.      The INVOICE file has the following KEY:
  517.  
  518.               INV:InvoiceKey        !Key for INVOICES file
  519.                  ├─ INV:InvoiceNo   !Invoice Number
  520.                  └─ INV:Date        !Date of Invoice
  521.  
  522.      You can  use the Embedded Source window "Setup
  523.      Screen", to assign a value to the "Range Limit" field.
  524.  
  525.      Given the above KEY for the INVOICE file, you can
  526.      Browse the INVOICE file, and display only the INVOICES
  527.      that were entered for a specific date.
  528.  
  529.      To view all invoices for "today" in the embedded
  530.      source window "Setup Screen", you would enter:
  531.  
  532.      INV:Date = TODAY()
  533.  
  534. <  Range Value Field: >
  535. Range Value Field:
  536. ──────────────────
  537.      The "Range Value" field is used in conjunction with
  538.      the "Range Limit" field.   When a Browse is started,
  539.      the value in the "Range Value" field is assigned to
  540.      the "Range Limit" field. This "limits" the Browse
  541.      without having to place the "Range Limit" field on the
  542.      Browse screen.
  543.  
  544.      The "Range Value" field is typically assigned a value
  545.      by the procedure which calls the Browse.
  546.  
  547.      The "Range Value" field cannot be the same field as
  548.      the "Range Limit" field.
  549.  
  550. <    Example of a Range Value Field>
  551.      Example of a Range Value Field
  552.      ──────────────────────────────
  553.  
  554.      You want to let the user Browse the INVOICE file,
  555.      select an Invoice, and then Browse the ITEMS for the
  556.      selected Invoice.
  557.  
  558.      The Browse "Access Key" for the ITEMS file looks
  559.      like this:
  560.  
  561.               ITM:InvoiceKey        !Key for ITEMS file
  562.                  ├─ ITM:InvoiceNo   !Invoice Number
  563.                  └─ ITM:Line        !Line number on Invoice
  564.  
  565.  
  566.      The INVOICE file has the following KEY:
  567.  
  568.               INV:InvoiceKey        !Key for INVOICES file
  569.                  ├─ INV:InvoiceNo   !Invoice Number
  570.                  └─ INV:Date        !Date of Invoice
  571.  
  572.      Enter the "Range Limit" field as ITM:InvoiceNo, and
  573.      enter the "Range Value" field as INV:InvoiceNo.  The
  574.      Browse of the ITEMS file is "limited" to the value of
  575.      ITM:InvoiceNo, which receives its value from the
  576.      "Range Value" field; INV:InvoiceNo.
  577.  
  578.      The Browse of the INVOICE file is executed as a
  579.      "lookup" by entering the following code in the "Setup
  580.      Procedure" Embedded Source point:
  581.  
  582.      SETKEYCODE(ShftEnter)     ! call the Browse with the
  583.                                ! "Select" button active
  584.  
  585.      The Browse of the INVOICE file allows the user to
  586.      highlight an Invoice record, then hit the "Select"
  587.      button.  The "Select" button is used to call the
  588.      Browse of the ITEMS file.
  589.  
  590.      When the Browse for ITEMS is executed, INV:InvoiceNo is
  591.      assigned to ITM:InvoiceNo.  The List box is filled
  592.      with ITEMS for the INVOICE the user selected.
  593.  
  594. <  Record Filter: >
  595. Record Filter:
  596. ──────────────
  597.      You can display a subset of a data file using either
  598.      the "Range Limit" field, or a Record Filter.  If the
  599.      subset of the file is based on a field value which is
  600.      a component of the "Access Key" for the Browse, then
  601.      the "Range Limit" field will provide the fastest
  602.      performance. If the subset of the file is based on a
  603.      field which is not a component of the "Access Key" then
  604.      you will need to use a record filter.
  605.  
  606.      You can use BOTH a "Record Filter:" and a "Range
  607.      Limit" field.  This will give you the performance of a
  608.      "Range Limited" Browse, but allow you to display a
  609.      subset of those records.
  610.  
  611.      There are 2 methods you can use to enter a record
  612.      filter:
  613.  
  614.      Method #1.
  615.      You can use the Formula Generator to create a formula,
  616.      and enter a Formula Class of 'FILTER'.  The code
  617.      generated will "FILTER' the file based on your
  618.      formula.
  619.  
  620.      Method #2.
  621.      The "Record Filter:" entry field on the Browse
  622.      Procedure Properties dialog allows free-form
  623.      entering of a record filter expression. The code
  624.      entered here will not be validated before a compile.
  625.      Those who are not fully familiar with the Clarion
  626.      Language should use the Formula Generator instead of
  627.      this entry field.
  628.  
  629. <  Locator Field: >
  630. Locator Field:
  631.      A locator field is a screen entry field that updates a
  632.      component of the primary file access key. When a
  633.      locator field is entered, the closest matching record
  634.      is displayed in the list box.  The Locator field is
  635.      usually placed after the List box in the Field order
  636.      list, you can check this using Ctrl-F in the Screen
  637.      formatter.  Placing the Locator after the List box
  638.      allows the List box to be filled as soon as the Browse
  639.      is called, if the Locator is placed before the List
  640.      box the List will not be filled until the user TABS
  641.      off the List box.
  642.  
  643.      For example, scrolling a vendor file in vendor name
  644.      sequence uses a key that contains the vendor name field
  645.      (e.g. VND:Name).  To create a vendor name locator
  646.      field, place a VND:Name entry field on the screen
  647.      before or after the list box, and enter VND:Name for
  648.      the Locator Field on the Browse Property Screen.
  649.  
  650.      At runtime, when the user is scrolling the List box,
  651.      typing any character on the keyboard selects the
  652.      locator field, and allows entry for the match. Pressing
  653.      the Tab key positions the highlight bar to the closest
  654.      match.
  655.  
  656.      *If your Locator field is a Numeric field, you should
  657.      add the 'B'; to blank if zero, to the picture token.
  658.  
  659. <  Incremental Locator  >
  660. [√] Incremental Locator
  661.      Check this box to indicate that the Locator Field will act
  662.      function as an "Incremental Locator". You MUST place
  663.      the "Locator" field AFTER the List box in the Field
  664.      List, for the incremental search to work correctly.
  665.  
  666.      This template option allows one-half second delay for
  667.      the user to type a new letter into the locator field.
  668.      At each pause longer than one-half second, the Locator
  669.      contents are used to locate the closest match (the Tab
  670.      key does not need to be pressed). The backspace key is
  671.      active during this process, and reverses the search.
  672.  
  673.      *If your Locator field is a Numeric field, you should
  674.      add the 'B'; to blank if zero, to the picture token.
  675.  
  676. <  Update Procedure: >
  677. Update Procedure:
  678.      Enter the name of the update procedure to be used to
  679.      insert, change, or delete records.  If no update procedure
  680.      is entered, the "Insert", "Change", and "Delete"
  681.      pushbuttons should be removed from the screen layout.
  682.  
  683. <  Enable Hot Records: >
  684. [√] Enable Hot Records:
  685.      Fields from the file being scrolled can be placed
  686.      outside the List box.  The fields will display values
  687.      from the record that is highlighted in the List box,
  688.      and are updated whenever the highlight bar is moved.
  689.      Hot fields should be set as "Display only" when
  690.      placed on the screen.
  691.  
  692.      If "Enable Hot Records" is checked, every movement of
  693.      the highlight bar reads the record from the Primary
  694.      file into memory.  Next, lookups to the "ONE" side of
  695.      any Many:1 relations are performed. Any FORMULAs
  696.      which do not have a formula class set to
  697.      (FILTER,AVG,SUM or CNT) are then executed.  Finally,
  698.      any embeddded source code which was entered in the
  699.      'Process Selected Record' code window is executed.
  700.  
  701. <  Enable Total Embeds >
  702. [√] Enable Total Embeds
  703.      Check this box to generate total field code, without
  704.      the need for dummy formula fields. Otherwise, you must
  705.      define a total field with a formula class of SUM, CNT
  706.      or AVG.
  707.  
  708. <  Disable Memo Access >
  709.      If the file being "Browsed" has a Memo field you can
  710.      improve the performance of the Browse procedure by
  711.      turning off the reading of memo fields.
  712.  
  713. <  Locator fields >
  714. Locator fields
  715. ──────────────
  716. You can place an optional "Locator" field on the Screen
  717. that lets users find a specific record in the file.  If the
  718. user types any letter while scrolling the LIST box control
  719. goes to the Locator field.  The Locator field is completed
  720. with either the TAB key or a mouse CLICK outside the Locator
  721. field.  Once the "Locator" is completed the BROWSE procedure
  722. displays the closest matching record at the first row of the
  723. List box.
  724.  
  725. *If your Locator field is a Numeric field, you should add
  726. the 'B'; to blank if zero, to the picture token.
  727.  
  728. < Incremental Locator fields >
  729. Incremental Locator fields
  730. ──────────────────────────
  731. You can also define the "Locator" field as an "Incremental
  732. Locator".   An "Incremental Locator" doesn't wait for the
  733. TAB or a mouse click to start the search for a matching
  734. record, instead every half-second a search is made for the
  735. closest match to the contents of the Locator field. So if
  736. the user types "S" the first record with "S" is displayed
  737. on the first line of the List box.  If the user then types
  738. "M" a search is made for "SM" and the List box is scrolled
  739. to that record.  Typing a "Y" starts a search for "SMY", and
  740. so on.
  741.  
  742. Pressing the backspace key will reposition the highlight
  743. bar in reverse order.   For numeric data types, it is
  744. recommended to use a string picture type (for display
  745. purposes).  Date fields are not recommended for incremental
  746. locators.
  747.  
  748. *If your Locator field is a Numeric field, you should add
  749. the 'B'; to blank if zero, to the picture token.
  750.  
  751. <Totals Fields>
  752. <  Averages>
  753. <  Counts>
  754. <  Sums>
  755. <  Counts>
  756.      Use a Formula field with Formula Class of "SUM" to
  757.      apply the formula to every record in the Browse
  758.      session.
  759.  
  760.      A Computed Field with "AVG" in the Formula Class field
  761.      calculates the average for the records included in the
  762.      Browse session.
  763.  
  764.      A Computed Field with "CNT" in the Formula Class field
  765.      counts the records included in the Browse session.
  766.  
  767.      Totals that use a Conditional Formula are calculated
  768.      based on the Formula Condition.
  769.  
  770.      See the Topic "Formula Classes" for more details.
  771.  
  772. <  Recalculating Totals>
  773.   If you are using Embedded Source to calculate totals, you
  774.   can call the ROUTINE InitializeTotals, in the EMBED point
  775.   "After Update Procedure" to re-calculate your totals.
  776.   The ROUTINE InitializeTotals is generated if you have
  777.   checked "Enable Total Embeds", or you have a Formula
  778.   field with the CLASS of SUM, CNT, or AVG.
  779.  
  780.   For example:
  781.  
  782.   IF UpdateSuccessful = True     !if the file was updated
  783.     DO InitializeTotals          ! recalculate totals
  784.   END
  785.  
  786. <  Browsing Fields from related files >
  787. Browsing Fields from related files
  788. ──────────────────────────────────
  789. The Browse procedure will "lookup" fields in a file on the
  790. "One" side of a Many:1 relationship from the file being
  791. viewed in the List box.
  792.  
  793. For example, if you have two files, Customers and Orders.
  794. The relationship from Customers to Orders is 1:Many, one
  795. Customer may have many Orders. If you create a Browse to
  796. view the Orders file, you can place a field from the
  797. Customer file in the List box, and the Browse procedure will
  798. automatically do the "lookup" into the Customer file.
  799.  
  800. <  Default Pushbuttons Insert,Change,Delete,Select>
  801. Update Procedure, Default Pushbuttons
  802. ─────────────────────────────────────
  803. The "Insert", "Change", and "Delete" pushbuttons call an
  804. update procedure to process the highlighted record (update
  805. procedures are normally created with a "Form" or "MultiPage"
  806. template). The name of the procedure is entered as the
  807. "Update Procedure" on the Browse procedure property screen.
  808. If you do not name an "Update Procedure" these pushbuttons
  809. have no default action.
  810.  
  811. If all three pushbuttons are deleted and you have named an
  812. Update Procedure, the INSERT, ENTER and DELETE keys will
  813. still call the Update Procedure.  However, if you only
  814. remove one or two of these buttons (Insert, Change, or
  815. Delete) no Update Procedure will be called for the removed
  816. button(s).
  817.  
  818. The "Exit" pushbutton has an edit procedure defined as
  819. "RETURN", so when the user hits "Exit" the user is returned
  820. to the calling procedure.  You may remove the "Exit" button,
  821. but some other provision must be made to return from the
  822. procedure.
  823.  
  824. <  Select pushbutton>
  825. <  Calling a Browse to Lookup a value>
  826. The "Select" pushbutton is used when a Browse procedure is
  827. called as a "lookup".  The "Select" button is dimmed unless
  828. the Browse is called with KEYCODE() set to ShftEnter
  829. (Shift and Enter keys together).  If you won't be using the
  830. Browse procedure for lookups, you can delete this button.
  831.  
  832. When the user presses the "Select" button the record
  833. highlighted in the List box is loaded into memory, and the
  834. program returns to the calling procedure.
  835.  
  836. <  Runtime Browse Navigation keys >
  837. Runtime Browse Navigation keys
  838. ──────────────────────────────
  839. At runtime, when the List box is selected a highlight bar
  840. is always positioned over a single record in the List box.
  841. The Up and Down arrow keys move the highlight bar. Moving
  842. the highlight bar up off the top row or down off the bottom
  843. row scrolls a new record into the list box. The PGUP and
  844. PGDN keys scroll the prior and next page of records into the
  845. list box.   CTRL-PGUP displays the first page of records and
  846. CTRL-PGDN displays the last page of records.  Pressing the
  847. right mouse button in the top half of the List box scrolls
  848. up and in the bottom half scrolls down.
  849.  
  850.  
  851. <  Local Data >
  852. Local Data
  853. ──────────
  854. If you use the "Data" button on the procedure properties
  855. screen local data is generated before the screen structure.
  856.  
  857. If you use the Embedded source point "Data Section" the
  858. data is generated after the Screen structure.
  859.  
  860. <  Pulldown Menu >
  861. Pulldown Menu
  862. ─────────────
  863. If a pulldown structure has been created in the Pulldown
  864. Menu Formatter, it is generated after the screen structure.
  865. The template makes no provision for opening or closing a
  866. pulldown menu.  Such statements must be entered as embedded
  867. source.
  868.  
  869. <Formatter Support>
  870. Formatter Support
  871. ─────────────────
  872. The "Browse" procedure in CLARION.APP is pre-loaded with a
  873. screen layout containing a list box and pushbuttons named
  874. "Insert", "Change", "Delete", "Select", and "Exit". The
  875. field equate label of the list box MUST be "?List" and the
  876. "Immediate" attribute MUST be on turned on.  The horizontal
  877. scroll bar can be turned off if the required information
  878. fits in the list box. The vertical scroll bar is ignored by
  879. the template.  The list box may not have an edit procedure.
  880. All other properties of the list box can be changed.
  881.  
  882. The Report Formatter is not supported.
  883.  
  884. <Property Fields>
  885. Property Fields
  886. ───────────────
  887.  
  888. <Embedded Source>
  889. Embedded Source
  890.  
  891. <  Data Section>
  892. "Data Section"
  893.      In the data section of the procedure after local data, the
  894.      screen and pulldown structures. This may be used to
  895.      declare any data which you may want to use only in your
  896.      embedded source code.
  897.  
  898. <  Setup Procedure>
  899. "Setup Procedure"
  900.      After the CODE statement.
  901.  
  902. <  Setup Screen>
  903. "Setup Screen"
  904.      After OPEN(Screen) statement.
  905.  
  906. <  Setup Pulldown>
  907. "Setup Pulldown"
  908.      After OPEN(PullDown) statement.
  909.  
  910. <  Set to First Record Before Total Loop>
  911. "Set to First Record Before Total Loop"
  912.      After the SET(key,key) for Range limits before
  913.      beginning the total calculation LOOP.
  914.  
  915. <  Inside Total Loop, Immediately after NEXT>
  916. "Inside Total Loop, Immediately after NEXT"
  917.      Immediately after each record is read in the total
  918.      calculation LOOP.
  919.  
  920. <  Inside Total Loop after Filter>
  921. "Inside Total Loop after Filter"
  922.      After each record is read and filter conditions are
  923.      evaluated in the total calculation LOOP.
  924.  
  925. <  After Total Field Loop>
  926. "After Total Field Loop"
  927.      After all totals have been calculated.
  928.  
  929. <  LIST Class Formula>
  930. "LIST Class Formula"
  931.      After generation of LIST class formulas. This embedded
  932.      code window may be used instead of LIST class formulas.
  933.       This will allow setting up any fields which are
  934.      displayed within the scrolling listbox.
  935.  
  936. <  Case of No Records Found>
  937. "Case of No Records Found"
  938.      When no records are found to display.
  939.  
  940. <  After Filter and Range Check>
  941. "After Filter and Range Check"
  942.      After any record filter or Range limits are evaluated.
  943.  
  944. <  End of General Formulas>
  945. "End of General Formulas"
  946.      When processing a screen field, the formulas which do
  947.      not have a class of 'FILTER' or 'LIST' will be
  948.      generated.  This embedded source window allows the
  949.      entry of computations for screen display fields without
  950.      the use of the Formula Formatter.
  951.  
  952. <  Set to First Record>
  953. "Set to First Record"
  954.      When using Range Limits, a SET statement is issued to
  955.      locate the first record. This embedded source code
  956.      window appears just after the generated SET statement
  957.      and allows you to override the SET.
  958.  
  959. <  Set to Last Record>
  960. "Set to Last Record"
  961.      When using Range Limits, a SET statement is used to
  962.      locate the closest match to the last record.  This
  963.      embedded source code window appears just after the SET
  964.      and allows you to override the SET.
  965.  
  966. <  Process Selected Record>
  967. "Process Selected Record"
  968.      When Enable Hot Records has been checked, code within
  969.      this embedded source window is executed upon any
  970.      movement of the list box highlight bar. The highlighted
  971.      record is retrieved into memory, any Many to One
  972.      secondary file records are retrieved, and any general
  973.      formulas are computed just prior to this embedded
  974.      source code.
  975.  
  976. <  End of Procedure>
  977. "End of Procedure"
  978.      Code placed in this window executes after all other
  979.      code in the procedure has executed. This code begins in
  980.      column one, therefore you may use this window to write
  981.      any ROUTINEs which are called from any other embedded
  982.      source code window.
  983.  
  984. <  Prior to Update Procedure>
  985. "Prior to Update Procedure"
  986.      Immediately before the Update Procedure is called.
  987.  
  988. <  After Update Procedure>
  989. "After Update Procedure"
  990.      Immediately after return from the Update Procedure.
  991.  
  992. <  When Screen Field is Selected : >
  993. "When Screen Field is Selected : "
  994.      In the CASE SELECTED() structure, executed when the
  995.      field is selected for entry.
  996.  
  997. <  When Screen Field is Completed: >
  998. "When Screen Field is Completed: "
  999.      In the CASE FIELD() structure, executed when the field has
  1000.      been completed.
  1001.  
  1002. <Formula Classes>
  1003. Formula Classes
  1004.  
  1005. <  FILTER >
  1006. FILTER
  1007.      A Conditional Field with "FILTER" in the Formula Class field
  1008.      is used to display a subset of the datafile. If the
  1009.      "IF Condition" expression evaluates to false for a
  1010.      given record, it is not displayed.
  1011.  
  1012.      Enter the expression for the "IF Condition" field and
  1013.      leave the "True Formula" and "False Formula" fields
  1014.      blank. Only the Expression will be used for the filter.
  1015.  
  1016.      A filter expression can alternatively be entered in
  1017.      the Browse Procedure Property entry field "Record
  1018.      Filter: ", instead of using the formula generator.
  1019.  
  1020. <  LIST >
  1021. LIST
  1022.      A Conditional or Computed Field with "LIST" in the
  1023.      Formula Class field is used for those values which will
  1024.      be displayed in the list box and are only evaluated
  1025.      when the list box item is created.
  1026.  
  1027. <  SUM >
  1028. SUM
  1029.      A Computed Field with "SUM" in the Formula Class field
  1030.      calculates the "Formula Field" using the "Formula
  1031.      Expression".
  1032.  
  1033.      The code is generated as:
  1034.  
  1035.      FormulaFieldName$ += FormulaExpression
  1036.  
  1037.      A Conditional Field with "SUM" in the Formula Class
  1038.      field conditionally calculates the "Formula Field"
  1039.      using the "Formula Expression" contained in the fields
  1040.      named in the True and False Expressions.
  1041.  
  1042.      The code is generated as:
  1043.  
  1044.      IF CONDITION
  1045.        FormulaFieldName$ += the TRUE FormulaExpression
  1046.      ELSE
  1047.        FormulaFieldName$ += the FALSE FormulaExpression
  1048.      END
  1049.  
  1050. <  AVG >
  1051. AVG
  1052.      A Computed Field with "AVG" in the Formula Class
  1053.      field calculates an Average of the field named in the
  1054.      Expression. The total value is calculated, then
  1055.      divided by the number of records read to achieve that
  1056.      total.
  1057.  
  1058. <  CNT >
  1059. CNT
  1060.      A Computed Field with "CNT" in the Formula Class field
  1061.      counts the number of records included in the Browse
  1062.      session.
  1063.  
  1064. <  No class (blank) >
  1065. No class (blank)
  1066.      Calculates the formula every time any field on the
  1067.      screen is completed.  The calculation code is generated
  1068.      before the field edit routines at the top of the field
  1069.      processing code.
  1070.  
  1071. <<The Child Template>>
  1072. <General Information>
  1073.  
  1074. The "Child" template creates a procedure which has a screen with
  1075. features from both the Browse and Form templates. This
  1076. template screen has both a scrolling area and a record
  1077. update area.
  1078.  
  1079. This template is designed to process a batch of child
  1080. records as a single transaction. This batch of records
  1081. must be in a file which is the child file in a parent-child
  1082. relationship (the many side of a one-to-many relationship).
  1083. When a Child Procedure is called, all of the related
  1084. children records for the valid parent record in memory will
  1085. be loaded into a memory QUEUE (the parent record must
  1086. reside on disk as well as in memory).  The QUEUE may be
  1087. modified by adding, changing, or deleting records.  Upon
  1088. completion of the OK button, the QUEUE records are written
  1089. back to disk as a single transaction.  Changes to the QUEUE
  1090. are discarded if the Exit button is selected.
  1091.  
  1092. NOTE:  Autonumbering keys are NOT supported in the CHILD
  1093.        Template.  To use autonumbering keys, use a Browse-
  1094.        Form Pair for updates.
  1095.  
  1096. In order to maintain the highest level of data integrity,
  1097. the update of the child file is framed within a Transaction
  1098. process. (See the essay on Transaction Processing in the
  1099. Programmer's Guide for details.)
  1100.  
  1101. The Btrieve and Clarion file drivers support Transaction
  1102. Processing. So, the Child file must utilize one of these
  1103. file drivers in order to work properly.  For drivers which
  1104. do not support transaction processing, a Browse-Form
  1105. template combination may be used.
  1106.  
  1107. The correct File Schematic is essential to the proper
  1108. operation of a Child template procedure.  By selecting the
  1109. Files... button from the Procedure Properties screen you
  1110. may view the existing file schematic, or create a new file
  1111. schematic if one has not already been defined.
  1112.  
  1113. The child file must be the first (primary) file in the
  1114. File Schematic. The parent file must be listed below the
  1115. child file, and must have a relationship defined with the
  1116. child file as in the example below:
  1117.  
  1118.      This File Schematic is supported:
  1119.      ---------------------------------
  1120.          Primary (Child file)
  1121.            └──> Secondary (Parent file for Child)
  1122.  
  1123.      This File Schematic is NOT supported:
  1124.      -------------------------------------
  1125.          Primary (Parent file)
  1126.            └─>> Secondary (Child file of Parent)
  1127.  
  1128. The following is a check-list to help in creating a Child
  1129. template procedure for the first time:
  1130.  
  1131.      - Create the File schematic as shown above (Child file first,
  1132.      then Parent file). Select an Access key from the Child
  1133.      file to be used for the listbox order.
  1134.  
  1135.      - In the Screen Formatter, place Scrolling fields from the
  1136.      child file in the list box, and Child file Entry
  1137.      fields in the area above the Save and Exit buttons.
  1138.  
  1139.      - Re-order the fields on the screen so that the entry
  1140.        area fields are consecutive. Remember which field is
  1141.        your first update field. Save the screen structure.
  1142.  
  1143.      - Fill out the First Update Field and Parent File Procedure
  1144.        Property fields. These fields are required.
  1145.  
  1146. <Formatter Support>
  1147. Formatter Support
  1148.  
  1149. The Child template's default screen is pre-defined with
  1150. two logically separate areas, a scrolling area and a field
  1151. entry area.  The scrolling area lists all children records
  1152. for the selected parent.  The standard list box keys are
  1153. available to scroll through the child records.  (See the
  1154. Browse template's help for details.)
  1155.  
  1156. Buttons below the list box allow the user to Insert, Change
  1157. or Delete records. Also, an OK and Cancel button are
  1158. active while in the scrolling portion of the screen.
  1159.  
  1160. The field entry area is similar to a Form in operation.
  1161. Entry fields are placed in this area to allow data entry
  1162. for a child record.  The fields in this area must be
  1163. consecutive in the screen structure and must immediately
  1164. precede the Save and Exit buttons as a block of fields is
  1165. selectively ENABLE()'d and DISABLE()'d when moving back and
  1166. forth between the scrolling area and the update area.  The
  1167. record may be saved to the list box using the Save button,
  1168. or it may be erased by using the Exit button.  The OK and
  1169. Cancel buttons are only available while in the scrolling
  1170. area.
  1171.  
  1172. Once the OK button is completed, the entries in the QUEUE
  1173. are written to disk within a transaction.  If any error
  1174. occurs, the entire set of records are rolled back to the
  1175. status of the file before the OK button was completed and
  1176. the user is given an opportunity to change any problem
  1177. records and attempt a save again.
  1178.  
  1179. If a Pulldown structure has been created by the Pulldown
  1180. Menu Formatter, it is generated after the screen structure.
  1181. The Pulldown is OPENed after the screen structure, and is
  1182. closed upon exit from the procedure.
  1183.  
  1184. The Report Formatter is not supported.
  1185.  
  1186. <Property Fields>
  1187. Property Fields:
  1188.  
  1189. <  First Update Field>
  1190. First Update Field:
  1191.      The Child template has 2 separate modes of operation.  The
  1192.      template selectively disables fields which are not
  1193.      appropriate to the current mode.
  1194.  
  1195.      Scrolling Area - Only scrolling area field are
  1196.      available. Field Entry Area - Only entry specific
  1197.      fields are available.
  1198.  
  1199.      You MUST enter the First Update Field here. This
  1200.      should be the first entry field for the Child file.
  1201.      This is necessary to properly ENABLE() the range of
  1202.      fields in the screen structure from this field to the
  1203.      Exit pushbutton.  If the fields are not consecutive in
  1204.      the Field List, the proper fields may not be ENABLEd
  1205.      or DISABLEd.  The easiest way to insure consecutive
  1206.      entry fields is to Auto Re-order the screen fields
  1207.      just prior to saving the screen.
  1208.  
  1209. <  Parent File: >
  1210. Parent File:
  1211.      The Parent File MUST be supplied to identify which
  1212.      Parent file to use for the relationship.  The Child
  1213.      template is designed to handle the relationship
  1214.      between 1 Parent and 1 Child file.
  1215.  
  1216.      In order to insure that only 1 user in a multi-user
  1217.      environment may modify a batch of child records at a
  1218.      time, a HOLD is placed on the parent record. This
  1219.      will signal to other Child procedures that the
  1220.      children for this parent are currently being modified.
  1221.      Other procedures will be able to read the parent
  1222.      record, but will not be able to modify it. Therefore,
  1223.      it is important that when using a Child template
  1224.      procedure to modify a file's records, that there are
  1225.      no other procedures which may modify these child
  1226.      records. (Example: There must not be any Form template
  1227.      procedures which may modify a child file's record
  1228.      while it is being updated via a Child template.)
  1229.  
  1230. <  Exit on Null Parent:>
  1231. Exit on Null Parent:
  1232.      Since the parent record information is critical to
  1233.      finding the correct children for a parent, you may
  1234.      select to RETURN from the child procedure when no
  1235.      parent record has been selected. You may enter
  1236.      embedded source code to select a parent record and
  1237.      leave this checkbox blank.
  1238.  
  1239. <  Update Parent on OK:>
  1240. Update Parent on OK:
  1241.      With this checkbox enabled, the parent record is PUT
  1242.      back to its file upon completion of the OK button.
  1243.      This allows updating of any parent information which
  1244.      may have been changed while in the Child procedure.
  1245.  
  1246. <Embedded Source>
  1247. Embedded Source
  1248.  
  1249. <  Data Section>
  1250. "Data Section"
  1251.      In the data section of the procedure after local data,
  1252.      the screen and pulldown structures.  This may be used
  1253.      to declare any data which you may want to use only in
  1254.      your embedded source code.
  1255.  
  1256. <  Setup Procedure>
  1257. "Setup Procedure"
  1258.      After the CODE statement.
  1259.  
  1260. <  Setup Screen>
  1261. "Setup Screen"
  1262.      After OPEN(Screen).
  1263.  
  1264. <  Top of ACCEPT Loop>
  1265. "Top of ACCEPT Loop"
  1266.      After LOOP statement and prior to generating formula
  1267.      fields.
  1268.  
  1269. <  Prior to Return>
  1270. "Prior to Return"
  1271.      After exiting the main loop, but prior to freeing the
  1272.      Queue. This would be a good place to add code which
  1273.      needs to loop through the RecordQueue for information
  1274.      before exiting.
  1275.  
  1276. <  End of Procedure>
  1277. "End of Procedure"
  1278.      Code placed in this window executes after all other
  1279.      code in the procedure has executed.  This code begins
  1280.      in column one, therefore you may use this window to
  1281.      write any ROUTINEs which are called from any other
  1282.      embedded source code window.
  1283.  
  1284. <  Enter Scroll Mode Routine>
  1285. "Enter Scroll Mode Routine"
  1286.      After the DISABLE and ENABLE of the fields to switch
  1287.      to the scrolling area from the entry field area.  This
  1288.      is a good place to override the automatic enabling and
  1289.      disabling of fields.
  1290.  
  1291. <  Enter Update Mode Routine>
  1292. "Enter Update Mode Routine"
  1293.      Also a good place to override the automatic enabling
  1294.      and disabling of fields, but when going to update
  1295.      mode.
  1296.  
  1297. <  When Screen Field is Selected : >
  1298. "When Screen Field is Selected : "
  1299.      In the CASE SELECTED() structure, executed when the
  1300.      field is selected for entry.
  1301.  
  1302. <  When Screen Field is Completed: >
  1303. "When Screen Field is Completed: "
  1304.      In the CASE FIELD() structure, executed when the field has
  1305.      been completed.
  1306.  
  1307.  
  1308. <<The External Template>>
  1309. <General Information>
  1310.  
  1311. The "External" template notifies the Application Generator
  1312. that the procedure is contained in an external source,
  1313. object, or Library file. No source code is generated for
  1314. an "External" procedure.  The procedure's prototype is
  1315. placed in the program's MAP from the MODULE Structure
  1316. Include File named on the Module Properties window.
  1317.  
  1318. The Module Name field must contain the filename of an
  1319. external source, object or library file.
  1320.  
  1321.  
  1322. <<The File Template>>
  1323. <General Information>
  1324.  
  1325. The File template produces a procedure which will allow the
  1326. user to Pick a DOS filename from a listing of files on the
  1327. currently logged disk.
  1328.  
  1329. The user may use the keyboard or the mouse to change
  1330. directories or select the file.  Since the file mask is an
  1331. Entry field, the file mask may be changed by the user.
  1332.  
  1333. A mouse double-click on button 1 (The left button on a
  1334. right handed mouse) will change directory if the directory
  1335. list box is selected, or will select the highlighted file
  1336. if in the files list box.
  1337.  
  1338. <Formatter Support>
  1339. Formatter Support
  1340.  
  1341. The "File" procedure in CLARION.APP is pre-loaded with a
  1342. screen layout containing 2 listboxes, 1 file mask entry
  1343. field, 1 directory name display field, and 2 pushbuttons
  1344. named "OK" and "Cancel".
  1345.  
  1346. The files listbox shows filenames in the selected directory
  1347. which match the file mask. The directories listbox displays
  1348. any subdirectories in the current directory and the parent
  1349. directory denoted by '..' when available.  The file mask
  1350. entry field is large enough to contain a simple file mask of
  1351. '*.???' and will cause the files list box to be rebuilt when
  1352. changed. The directory display field will display the
  1353. current directory up to 35 characters. The OK pushbutton
  1354. will write the selected filename to the specified Filename
  1355. Variable and Cancel pushbutton will return to the calling
  1356. procedure leaving the Filename Variable with its original
  1357. contents.
  1358.  
  1359. <Property Fields>
  1360. Property Fields
  1361.  
  1362. <  Filename Variable:>
  1363. Filename Variable:
  1364.      The filename may be saved in any string variable. (It
  1365.      is suggested to use STRING(64) since the path will be
  1366.      added. DOS allows a 64 character filename.) However,
  1367.      a default variable has been added to the global data
  1368.      of the Default Application file (GLO:Filespec in
  1369.      CLARION.APP) and it will hold the filename if the
  1370.      Filename Variable is blank.
  1371.  
  1372. <  Initial Directory:>
  1373. Initial Directory:
  1374.      Optionally, an initial directory may be specified for
  1375.      the opening directory listing (like REPORTS).  The File
  1376.      template will call SETPATH() just prior to filling the
  1377.      list box. Another SETPATH() will return to the original
  1378.      path before returning from this procedure.
  1379.  
  1380. <  Beginning file mask:>
  1381. Beginning file mask:
  1382.  
  1383.      A beginning file mask may also be entered to use for
  1384.      the opening file list. The files will be sorted within
  1385.      the mask. If no match for the file mask is found, the
  1386.      text 'NO MATCH' will appear in the file list box.  If
  1387.      no Beginning File Mask is entered the default file mask
  1388.      '*.*' will be used.
  1389.  
  1390. <  Next Procedure:>
  1391. Next Procedure:
  1392.      Enter the name of a procedure to be called once a
  1393.      filename has been successfully selected. The Filename
  1394.      Variable will be assigned the selected filename and the
  1395.      Next Procedure will be called.
  1396.  
  1397.      The View template was designed in conjunction with the
  1398.      File template and may be used to view the selected
  1399.      file.  Enter the name of a procedure created with the
  1400.      View template as the Next Procedure for this
  1401.      combination.
  1402.  
  1403. <  Reselect Upon Return:>
  1404. Reselect Upon Return:
  1405.      If a Next Procedure is defined, an option is provided
  1406.      to have one of the following occur:
  1407.  
  1408.      1) Return to the calling procedure after a return from the
  1409.       update procedure. (the default)
  1410.  
  1411.      2) Allow the user to reselect another filename after a
  1412.      return from the update procedure. (When the checkbox is
  1413.      checked.)
  1414.  
  1415. <  Blank Name On Cancel:>
  1416. Blank Name On Cancel:
  1417.      If checked, the variable you named as the Filename
  1418.      Variable (above) will be blanked when the user selects
  1419.      the Cancel button.  When no Filename Variable is
  1420.      specified, GLO:FileSpec (the default filename variable)
  1421.      is blanked.
  1422.  
  1423.      This option is useful when using a File template
  1424.      without a Next Procedure.  In this case, it is possible
  1425.      to detect if the user has not selected a file by
  1426.      checking the value contained in the Filename Variable
  1427.      (or GLO:FileSpec).
  1428.  
  1429. <  Allow Drive Searches:>
  1430. Allow Drive Searches:
  1431.      If checked, the list of directories will also contain
  1432.      all the current DOS drive letters.  This allows the
  1433.      user to search for the file on any valid drive.
  1434.  
  1435. <Embedded Source>
  1436. Embedded Source
  1437.  
  1438. <  Data Section >
  1439. "Data Section"
  1440.      In the data section of the procedure before local
  1441.      data, the screen and pulldown structures.  This may be
  1442.      used to declare any data which you may want to use only
  1443.      in your embedded source code.
  1444.  
  1445. <  Setup Procedure >
  1446. "Setup Procedure"
  1447.      After the CODE statement.
  1448.  
  1449. <  Setup Screen>
  1450. "Setup Screen"
  1451.       After the OPEN(Screen) statement.
  1452.  
  1453. <  Top of Accept Loop>
  1454. "Top of Accept Loop"
  1455.       At the top of the screen field processing loop.
  1456.  
  1457. <  End of Procedure>
  1458. "End of Procedure"
  1459.      Code placed in this window executes after all other
  1460.      code in the procedure has executed.  This code begins
  1461.      in column one, therefore you may use this window to
  1462.      write any ROUTINEs which are called from any other
  1463.      embedded source code window.
  1464.  
  1465. <  When Screen Field is Selected : >
  1466. "When Screen Field is Selected : "
  1467.      In the CASE SELECTED() structure, executed when the
  1468.      field is selected for entry.
  1469.  
  1470. <  When Screen Field is Completed: >
  1471. "When Screen Field is Completed: "
  1472.      In the CASE FIELD() structure, executed when the field
  1473.      has been completed.
  1474.  
  1475. <Formula Classes>
  1476. Formula Classes
  1477.  
  1478. No formula classes are supported by this procedure
  1479. Template. Formula fields are not supported.
  1480.  
  1481.  
  1482. <<The Form Template>>
  1483. <General Information>
  1484.  
  1485. The "Form" template generates a procedure that will ADD,
  1486. CHANGE or DELETE a record from the procedure's Primary file
  1487. (as defined in the File Schematic).
  1488.  
  1489. If the Global Application prompt, "Enable Shared Files: "
  1490. is checked ON, the code is generated with complete Record
  1491. level locking for a multi-user application.
  1492.  
  1493. Referential Integrity constraints, as defined in the Data
  1494. Dictionary, are enforced during any update to the Primary
  1495. file, for ALL 1:MANY relationships to the Primary file.
  1496.  
  1497. The template allows for multiple auto-increment key fields
  1498. and concurrency checks of multiple memo fields.
  1499.  
  1500. <Data Dictionary Validity Checks>
  1501. <Initial field values>
  1502. <Range checking>
  1503. "Initial values" defined in the Data Dictionary are
  1504. pre-loaded during an ADD.
  1505.  
  1506. "Range checks" are generated from the Data Dictionary
  1507. definitions and are enforced during an ADD or CHANGE. If an
  1508. out of range condition exists, the user is notified
  1509. (using the ShowWarning procedure) of the valid range for
  1510. the field, and the cursor is placed on that field for
  1511. editing.
  1512.  
  1513. <Displaying fields from Related Files>
  1514. The template automatically generates GET statements to
  1515. access any secondary files where the relationship from
  1516. the procedures Primary file is defined as MANY:1.  Fields
  1517. from the "1" side of the relationship should be placed on
  1518. the Screen as "display-only".  No code is generated to
  1519. update files on the "1" side of the relationship.
  1520.  
  1521. Example:
  1522.   In the Data Dictionary you have defined CUSTOMERS and
  1523.   INVOICES as a 1:MANY relationship; "1" customer may
  1524.   have MANY invoices. That means the INVOICES file is
  1525.   related MANY:1 to the CUSTOMERS file.
  1526.  
  1527.   On the FORM used to update the INVOICES file you can place
  1528.   the CUSTOMERS name and address fields on the Screen, and
  1529.   the correct CUSTOMERS record will be retrieved from the
  1530.   file. But even if you allowed changes to the CUSTOMERS
  1531.   name and address fields, there would not be any code
  1532.   generated to update the CUSTOMERS record.
  1533.  
  1534. <Data Dictionary Validity>
  1535. <  Must be in File>
  1536. <  Automatic field validation>
  1537. The "Must be in File" validity check defined in the Data
  1538. Dictionary is enforced when the field is "completed", or
  1539. when the user presses the "OK" button.
  1540.  
  1541. <  Lookups>
  1542. Enter the name of a BROWSE procedure in the "When Field is
  1543. Selected Procedure:" entry, if you want a Browse "lookup"
  1544. to appear as soon as the field is selected by the user.
  1545.  
  1546. Use the "When Field is Completed Procedure:"  if you
  1547. want to  "validate" an entry after the user completes
  1548. the field.
  1549.  
  1550. <  Multiuser File Updates>
  1551. If the application is set to SHARE files, the procedure
  1552. enforces multi-user concurrency checking at the record
  1553. level.  If a conflict arises from two or more workstations
  1554. attempting to update the same record, the Record is re-read
  1555. from disk and the FORM screen is refreshed.  The user is
  1556. notified of the change, and placed back in edit mode.
  1557.  
  1558. <  Referential Integrity>
  1559. If Relational Constraints have been defined in the Data
  1560. Dictionary, code is generated to enforce the Constraint on
  1561. 1:MANY relationships.  All Referential Integrity Constraints are
  1562. enforced from the Primary file for the procedure, down its
  1563. Relational File Tree for as many levels as exist.
  1564.  
  1565. <  Transaction Framing >
  1566. During a relational Change or Delete a HOLD is placed on
  1567. the Primary file record.  All child files of the Primary
  1568. file are updated within a transaction frame to ensure an
  1569. 'all or nothing' update or delete.  If LOGOUT cannot be
  1570. initiated, the user is given a chance to retry the update or
  1571. delete.
  1572.  
  1573. <  No Transaction Framing >
  1574. Not all file drivers support transaction processing.  If
  1575. you are using a File driver that does not support
  1576. transaction processing, or using multiple file
  1577. drivers within a relationship, you will receive a Warning
  1578. during code generation:
  1579.  
  1580.   "PRIMARY file driver does not support LOGOUT()"
  1581.  
  1582. If the file driver does not support the LOGOUT statement,
  1583. code is generated to update the files without the benefit of
  1584. a transaction frame.
  1585.  
  1586. Also, if the files in the Relationship use multiple file
  1587. drivers, the referential update/delete cannot use the LOGOUT
  1588. statement.
  1589.  
  1590. For example, if a file relationship is defined with one file
  1591. using the Btrieve driver and the related file using the
  1592. Clarion driver, code is generated without a LOGOUT
  1593. transaction frame.  Either situation has the potential to
  1594. compromise the referential integrity of your database.  If
  1595. the update/delete fails for any reason, your files cannot be
  1596. restored to their original state.
  1597.  
  1598. Finally, if you have set up multiple relations between the
  1599. same two files, transaction framing cannot process these
  1600. relations.  This will be evident at run-time as a Clarion
  1601. Run-Time error, Cannot Logout Files.  In this case, check
  1602. the Disable RI Logout Check-box on the Procedures Property
  1603. screen.
  1604.  
  1605. <Formatter Support>
  1606. Formatter Support
  1607.  
  1608. The default screen contained in CLARION.APP has a local
  1609. variable named LOC:Message placed at the top of the entry
  1610. screen. This variable is used to inform the user of the
  1611. current action: Add, Change, or Delete of the record on the
  1612. screen.  The message displayed is stored in CLARION.APP in
  1613. the global variables as GLO:InsertMsg, GLO:ChangeMsg, and
  1614. GLO:DeleteMsg.
  1615.  
  1616. You can enter your own messages on the Procedure
  1617. Properties window. If any Prompt for a message is filled in,
  1618. it will be used instead of the global values stored in the
  1619. default .APP file.
  1620.  
  1621. The default screen has two buttons: Ok and Cancel.  Both of
  1622. these fields are required by the template.
  1623.  
  1624. If a Pulldown structure has been created by the Pulldown
  1625. Menu Formatter, it is generated after the screen structure.
  1626. The Pulldown is OPENed after the screen structure, and is
  1627. closed upon exit from the procedure.
  1628.  
  1629. The Report Formatter is not supported.
  1630.  
  1631. <Property Fields>
  1632. Property Fields
  1633.  
  1634. <  Insert Message>
  1635. Insert Message
  1636.      Enter a message to use instead of the default stored
  1637.      in Clarion.app for Inserting a record.
  1638.  
  1639. <  Change Message>
  1640. Change Message
  1641.      Enter a message to use instead of the default stored
  1642.      in Clarion.app for Changing a record.
  1643.  
  1644. <  Delete Message>
  1645. Delete Message
  1646.      Enter a message to use instead of the default stored
  1647.      in Clarion.app for Deleting a record.
  1648.  
  1649. <  Action after ADD>
  1650. Action after ADD
  1651.      The template supports multiple adds without leaving
  1652.      the FORM screen.  There are four possible actions after
  1653.      an ADD:
  1654.  
  1655.      'Return to caller ' generates code to return to the
  1656.      calling procedure after the record is added.
  1657.  
  1658.      'Retain Record ' generates code to allow continuous
  1659.      ADDs without clearing the record buffer or the screen.
  1660.      When the user selects the 'Ok' button the record
  1661.      buffer's contents are ADDed to the file and the user is
  1662.      placed back on the first entry field on the screen. If
  1663.      there are Auto-increment keys defined for the file,
  1664.      the record is saved, the next Autonumber is retrieved,
  1665.      then the record is restored.
  1666.  
  1667.      'Clear Record ' generates code to allow continuous
  1668.      ADDs but clears the record buffer and screen between
  1669.      each ADD.  When the user selects the Ok button the
  1670.      screen and record buffer are cleared and the user is
  1671.      placed back on the first entry field on the screen. If
  1672.      there are Auto-increment keys defined for the file,
  1673.      the next Autonumber is retrieved and the screen
  1674.      updated.
  1675.  
  1676. <  Copy field hotkey:>
  1677. Copy field hotkey:
  1678.      This prompt is dependent on the 'Retain_Record'
  1679.      button. If 'Retain Record' is selected, AND the 'Copy
  1680.      field hotkey' contains a hotkey value, the template
  1681.      generates code for repeated ADDs that allows the user
  1682.      to duplicate individual fields from the prior record
  1683.      only when the hotkey is pressed.
  1684.  
  1685.      When the user presses the Ok button, the screen fields
  1686.      are erased and the cursor is placed back on the first
  1687.      field.  If the user presses the defined hotkey the
  1688.      contents of the currently highlighted field are copied
  1689.      from the last record the user added.
  1690.  
  1691. <  Next Procedure>
  1692. Next Procedure
  1693.      Enter the Procedure to call when the Ok button is
  1694.      pressed, AFTER the file's update has completed without
  1695.      any errors. The Next Procedure call is generated before
  1696.      the code for any Repeated ADDs.
  1697.  
  1698. <  Disable RI Logout>
  1699. Disable RI Logout
  1700.      If multiple CONSTRAINED relations exist between any
  1701.      two files processed by the Referential Integrity code,
  1702.      when this code is processed your program will
  1703.      experience a Clarion Run-Time halt, Cannot Logout
  1704.      Files.  Check the Disable RI Logout Check-Box to
  1705.      stop the RI code from generating.  NOTE:  ANY RI
  1706.      TRANSACTIONS will not be recoverable if an error
  1707.      occurs.
  1708.  
  1709. <Embedded Source>
  1710. Embedded Source
  1711.  
  1712. <  Data Section >
  1713. "Data Section"
  1714.      In the data section of the procedure after local data,
  1715.      the screen and pulldown structures. This may be used to
  1716.      declare any data which you may want to use only in your
  1717.      embedded source code.
  1718.  
  1719. <  Setup Procedure >
  1720. "Setup Procedure"
  1721.      Source code is inserted after the CODE statement.
  1722.  
  1723. <  On Add After Record Buffer Is Cleared >
  1724. "On Add After Record Buffer Is Cleared"
  1725.      Immediately after the record buffer is cleared for an
  1726.      AddRecord and just before auto-incrementing fields are
  1727.      incremented or fields with initial values are
  1728.      initialized.
  1729.  
  1730. <  Setup Screen >
  1731. "Setup Screen"
  1732.      After OPEN(Screen).
  1733.  
  1734. <  Before File I/O >
  1735. "Before File I/O"
  1736.      Immediately before the record is written to disk (ADD, PUT,
  1737.      or DELETE).
  1738.  
  1739. <  Setup Next Procedure >
  1740. "Setup Next Procedure"
  1741.      If a 'Next Procedure' was defined, code is inserted
  1742.      before the procedure is called.
  1743.  
  1744. <  Return from Next Procedure >
  1745. "Return from Next Procedure"
  1746.      If a 'Next Procedure' was defined, code is inserted
  1747.      after the procedure is executed.
  1748.  
  1749. <  After ADD on Retain or ClearRecord >
  1750. "After ADD on Retain or ClearRecord"
  1751.      After a record has been added and just before going on
  1752.      to add another record in "recursive add mode."
  1753.  
  1754. <  End of Procedure >
  1755. "End of Procedure"
  1756.      Code placed in this window executes after all other
  1757.      code in the procedure has executed. This code begins in
  1758.      column one, therefore you may use this window to write
  1759.      any ROUTINEs which are called from any other embedded
  1760.      source code window.
  1761.  
  1762. <  When Screen Field is Selected : >
  1763. "When Screen Field is Selected : "
  1764.      In the CASE SELECTED() structure, executed when the
  1765.      field is selected for entry.
  1766.  
  1767. <  When Screen Field is Completed: >
  1768. "When Screen Field is Completed: "
  1769.      In the CASE FIELD() structure, executed when the field
  1770.      has been completed.
  1771.  
  1772. <Formula Classes>
  1773.  Formula Classes
  1774.  
  1775. <  SETUP >
  1776. SETUP
  1777.      A Conditional or Computed Field with "SETUP" in the
  1778.      Formula Class field is calculated once at the beginning
  1779.      of the procedure before the screen field processing
  1780.      LOOP.
  1781.  
  1782. <  RETURN >
  1783. RETURN
  1784.      A Conditional or Computed Field with "RETURN" in the
  1785.      Formula Class field is calculated once just before the
  1786.      return from the procedure when the user selects the
  1787.      'Ok' button.
  1788.  
  1789. <  PRIMEKEY >
  1790. PRIMEKEY
  1791.      A Conditional or Computed Field with "PRIMEKEY" in the
  1792.      Formula Class field is calculated just before the
  1793.      SET(Key,Key) during an Autoincrement ADD. It is
  1794.      inserted again right before the ADD(File) to preserve
  1795.      any components you have primed.
  1796.  
  1797.      This can be used to prime key components to enable
  1798.      subset numbering. For example, it can be used to cause
  1799.      autonumbering of line item numbers on an invoice.  If
  1800.      you have defined a key with the fields InvoiceNumber
  1801.      and LineItemNo, supply the current InvoiceNumber as a
  1802.      PRIMEKEY Formula.  The AutoNumber Routine determines
  1803.      the next available LineItemNo for that invoice.  The
  1804.      record ADDed to the file will already have
  1805.      InvoiceNumber and LineItemNo in the record buffer and
  1806.      on disk.
  1807.  
  1808. <  No class (blank) >
  1809. No class (blank)
  1810.      Calculates the formula every time any field on the
  1811.      screen is completed.  The calculation code is generated
  1812.      before the field setup routines at the top of the
  1813.      processing LOOP.
  1814.  
  1815.  
  1816. <<The Form21 Template>>
  1817. <General Information>
  1818.  
  1819. The "Form21" template generates a procedure that will ADD,
  1820. CHANGE or DELETE a record from the procedure's Primary file (as
  1821. defined in the File Schematic). This form works similarly
  1822. to the (non-CUA) version 2.1 form (the same keystrokes are
  1823. available to navigate and complete the form, as well as
  1824. version 3.0 button support).  Keystrokes supported:
  1825.  
  1826.   CtrlEsc ----------- Cancel
  1827.   CtrlEnter --------- Done
  1828.   Enter ------------- Field complete or Done (on last field)
  1829.   Esc --------------- Field return or Cancel (on first field)
  1830.  
  1831. The template allows for multiple auto-increment key fields
  1832. and concurrency checks of multiple memo fields.
  1833. Referential integrity constraints are enforced for any
  1834. 1:MANY relationships to the Primary file.
  1835.  
  1836. Initial field values from the Data Dictionary are
  1837. pre-loaded during an ADD.  Range checking is generated from
  1838. the Data Dictionary definitions and is enforced during ADD
  1839. or CHANGE.  If an out of range condition exists, the user is
  1840. notified of the valid range for the field, and the cursor is
  1841. placed on that field for editing.
  1842.  
  1843. The template generates GET statements to access secondary
  1844. files where the relationship is defined as MANY:1.  The
  1845. "Must be in File" automatic field entry validation from the
  1846. Data Dictionary is enforced when the user presses the OK
  1847. button. If the value entered in the field does not exist
  1848. in the specified file, the user is notified and is placed
  1849. back on the field.  Use the "When Field is Completed"
  1850. Procedure line if you wish to call a Validate procedure.
  1851.  
  1852. If the application is set to SHARE files, the procedure
  1853. enforces multi-user concurrency checking at the record
  1854. level.  If a conflict arises from two or more workstations
  1855. attempting to update the same record, the user's Screen is
  1856. refreshed with the record as changed by the other
  1857. workstation, the user is notified of the change, and placed
  1858. back in edit mode.
  1859.  
  1860. <  Referential Integrity>
  1861. If Relational Constraints have been defined in the Data
  1862. Dictionary, code is generated to enforce the Constraint on
  1863. 1:MANY relationships. All Referential Integrity Constraints
  1864. are enforced from the Primary file for the procedure, down
  1865. its Relational File Tree for as many levels as exist.
  1866.  
  1867. <  Transaction Framing >
  1868. During a relational Change or Delete a HOLD is placed on
  1869. the Primary file record.  All child files of the Primary
  1870. file are updated within a transaction frame to ensure an
  1871. 'all or nothing' update or delete.  If LOGOUT cannot be
  1872. initiated, the user is given a chance to retry the update or
  1873. delete.
  1874.  
  1875. <  No Transaction Framing >
  1876. Not all file drivers support transaction processing. If the
  1877. file driver does not support the LOGOUT statement, code is
  1878. generated to update the files without the benefit of a
  1879. transaction frame. Also, if the files in the Relationship
  1880. use multiple file drivers, the referential update/delete
  1881. cannot use the LOGOUT statement. For example, if a file
  1882. relationship is defined with one file using the Btrieve
  1883. driver and the related file using the Clarion driver, code
  1884. is generated without a LOGOUT transaction frame.  Either
  1885. situation has the potential to compromise the referential
  1886. integrity of your database.  If the update/delete fails for
  1887. any reason, your files cannot be restored to their original
  1888. state.
  1889.  
  1890. <Formatter Support>
  1891. Formatter Support
  1892.  
  1893. The default screen contained in CLARION.APP has a local
  1894. variable named LOC:Message placed at the top of the entry
  1895. screen. This variable is used to inform the user of the
  1896. current action: Add, Change, or Delete of the record on the
  1897. screen.  The message displayed is stored in CLARION.APP in
  1898. the global variables as GLO:InsertMsg, GLO:ChangeMsg, and
  1899. GLO:DeleteMsg.
  1900.  
  1901. You can enter your own messages on the Procedure Properties
  1902. window. If any Prompt for a message is filled in, it will be
  1903. used instead of the global values stored in the default
  1904. .APPfile.
  1905.  
  1906. The default screen has two buttons: Ok and Cancel.
  1907.  
  1908. If a Pulldown structure has been created by the Pulldown
  1909. Menu Formatter, it is generated after the screen structure.
  1910. The Pulldown is OPENed after the screen structure, and is
  1911. closed upon exit from the procedure.
  1912.  
  1913. The Report Formatter is not supported.
  1914.  
  1915. <Property Fields>
  1916. Property Fields
  1917.  
  1918. <  Insert Message>
  1919. Insert Message
  1920.      Enter a message to use instead of the default stored in
  1921.      CLARION.APP for Inserting a record.
  1922.  
  1923. <  Change Message>
  1924. Change Message
  1925.      Enter a message to use instead of the default stored
  1926.      in CLARION.APP for Changing a record.
  1927.  
  1928. <  Delete Message>
  1929. Delete Message
  1930.      Enter a message to use instead of the default stored
  1931.      in CLARION.APP for Deleting a record.
  1932.  
  1933. <  Action after ADD>
  1934. Action after ADD
  1935.      The template supports multiple adds without leaving
  1936.      the FORM screen.  There are four possible actions after
  1937.      an ADD:
  1938.  
  1939.      "Return to caller " generates code to return to the
  1940.      calling procedure after the record is added.
  1941.  
  1942.      "Retain Record" generates code to allow continuous
  1943.      ADDs without clearing the record buffer or the screen.
  1944.      When the user selects the 'Ok' button the record
  1945.      buffer's contents are ADDed to the file and the user
  1946.      is placed back on the first entry field on the screen.
  1947.      If there are Auto-increment keys defined for the file,
  1948.      the record is saved, the next Autonumber is retrieved,
  1949.      then the record is restored.
  1950.  
  1951.      "Clear Record " generates code to allow continuous
  1952.      ADDs but clears the record buffer and screen between
  1953.      each ADD.  When the user selects the Ok button the
  1954.      screen and record buffer are cleared and the user is
  1955.      placed back on the first entry field on the screen. If
  1956.      there are Auto-increment keys defined for the file, the
  1957.      next Autonumber is retrieved and the screen updated.
  1958.  
  1959. <  Copy field hotkey:>
  1960. Copy field hotkey:
  1961.      This prompt is dependent on the 'Retain_Record'
  1962.      button. If "Retain Record" is selected, AND the "Copy
  1963.      field hotkey" contains a hotkey value, the template
  1964.      generates code for repeated ADDs that allows the user
  1965.      to duplicate individual fields from the prior record
  1966.      only when the hotkey is pressed.
  1967.  
  1968.      When the user presses the Ok button, the screen fields are
  1969.      erased and the cursor is placed back on the first
  1970.      field. If the user presses the defined hotkey the
  1971.      contents of the currently highlighted field are copied
  1972.      from the last record the user added.
  1973.  
  1974. <  Next Procedure>
  1975. Next Procedure
  1976.      Enter the Procedure to call when the Ok button is
  1977.      pressed (or the form has been "completed"), AFTER the
  1978.      file's update has completed without any errors.  The
  1979.      Next Procedure call is generated before the code for
  1980.      any Repeated ADDs.
  1981.  
  1982. <Embedded Source>
  1983. Embedded Source
  1984.  
  1985. <  Data Section >
  1986. "Data Section"
  1987.      In the data section of the procedure after local data, the
  1988.      screen and pulldown structures. This may be used to
  1989.      declare any data which you may want to use only in
  1990.      your embedded source code.
  1991.  
  1992. <  Setup Procedure >
  1993. "Setup Procedure"
  1994.      Source code is inserted after the CODE statement.
  1995.  
  1996. <  On Add After Record Buffer Is Cleared >
  1997. "On Add After Record Buffer Is Cleared"
  1998.      Immediately after the record buffer is cleared for an
  1999.      AddRecord and just before auto-incrementing fields are
  2000.       incremented or fields with initial values are
  2001.      initialized.
  2002.  
  2003. <  Setup Screen >
  2004. "Setup Screen"
  2005.      After OPEN(Screen).
  2006.  
  2007. <  Before File I/O >
  2008. "Before File I/O"
  2009.      Immediately before the record is written to disk
  2010.      (ADD, PUT, or DELETE).
  2011.  
  2012. <  Setup Next Procedure >
  2013. "Setup Next Procedure"
  2014.      If a 'Next Procedure' was defined, code is inserted
  2015.      before the procedure is called.
  2016.  
  2017. <  Return from Next Procedure >
  2018. "Return from Next Procedure"
  2019.      If a 'Next Procedure' was defined, code is inserted
  2020.      after the procedure is executed.
  2021.  
  2022. <  After ADD on Retain or ClearRecord >
  2023. "After ADD on Retain or ClearRecord"
  2024.      After a record has been added and just before going on to add
  2025.      another record in "recursive add mode."
  2026.  
  2027. <  End of Procedure >
  2028. "End of Procedure"
  2029.      Code placed in this window executes after all other
  2030.      code in the procedure has executed. This code begins in
  2031.      column one, therefore you may use this window to write
  2032.      any ROUTINEs which are called from any other embedded
  2033.      source code window.
  2034.  
  2035. <Formula Classes>
  2036. Formula Classes
  2037.  
  2038. <  SETUP >
  2039. SETUP
  2040.      A Conditional or Computed Field with "SETUP" in the
  2041.      Formula Class field is calculated once at the beginning
  2042.      of the procedure before the screen field processing
  2043.      LOOP.
  2044.  
  2045. <  RETURN >
  2046. RETURN
  2047.      A Conditional or Computed Field with "RETURN" in the
  2048.      Formula Class field is calculated once just before the
  2049.      return from the procedure when the user selects the
  2050.      'Ok' button.
  2051.  
  2052. <  PRIMEKEY >
  2053. PRIMEKEY
  2054.      A Conditional or Computed Field with "PRIMEKEY" in the
  2055.      Formula Class field is calculated just before the
  2056.      SET(Key,Key) during an Autoincrement ADD. It is
  2057.      inserted again right before the ADD(File) to preserve
  2058.      any components you have primed.
  2059.  
  2060.      This can be used to prime key components to enable
  2061.      subset numbering. For example, it can be used to cause
  2062.      autonumbering of line item numbers on an invoice.  If
  2063.      you have defined a key with the fields InvoiceNumber
  2064.      and LineItemNo, supply the current InvoiceNumber as a
  2065.      PRIMEKEY Formula.  The AutoNumber Routine determines
  2066.      the next available LineItemNo for that invoice.  The
  2067.      record ADDed to the file will already have
  2068.      InvoiceNumber and LineItemNo in the record buffer and
  2069.      on disk.
  2070.  
  2071. <  No class (blank) >
  2072. No class (blank)
  2073.      Calculates the formula every time any field on the
  2074.      screen is completed. The calculation code is
  2075.      generated before the field setup routines at the top
  2076.      of the processing LOOP.
  2077.  
  2078.  
  2079. <<The List Template>>
  2080. <General Information>
  2081.  
  2082. The "List" template generates a procedure that scrolls data
  2083. files on the screen like a spreadsheet.  Unlike the Browse,
  2084. Lookup, or Validate templates the List template loads every
  2085. selected record from the file into memory before displaying the
  2086. list box.
  2087.  
  2088. The Queue for the list box must keep track of key values and
  2089. pointer fields as well as the information displayed in the list
  2090. box. Therefore, Using the list template for a very large file
  2091. would fill virtual memory and overflow onto disk.  In effect the
  2092. file is being copied before it is displayed.  For this reason,
  2093. the List template should only be used to display relatively
  2094. small files or relatively small sections of large files.
  2095.  
  2096. Selected fields from the data file are displayed as columns in
  2097. a list box.  Columns that do not fit in the list box are
  2098. displayed using a mouse with the horizontal scroll bar or the
  2099. left and right arrow keys.
  2100.  
  2101. A selector bar is always positioned over a single row.  The up
  2102. and down arrow keys move the selector bar.  Moving the selector
  2103. bar up off the top row or down off the bottom row scrolls a new
  2104. record into the list box.  The PGUP and PGDN keys scroll the
  2105. prior and next pages of records into the list box.  CTRL-PGUP
  2106. displays the first page of records and CTRL-PGDN displays the
  2107. last page of records. Pressing the right mouse button in the top
  2108. half of the list box scrolls up and in the bottom half scrolls
  2109. down.  The list box field must be the first field in the screen
  2110. structure when not using a record filter or record selector.
  2111.  
  2112. Fields may be placed before or after the list box field in the
  2113. Field List.  Selecting the LIST field from a prior field
  2114. displays the first page of records.  The "Insert", "Change", and
  2115. "Delete" pushbuttons, or any other field that processes the
  2116. record under the selector bar must be placed after the LIST
  2117. field in the Field List.
  2118.  
  2119. A checkbox is available to view a file in Record order. This is
  2120. primarily useful in viewing ASCII files.  Since ASCII, BASIC,
  2121. and DOS files have certain limitations, you should know the file
  2122. system's capabilities before attempting to use the List template
  2123. with an Update Procedure. (The View template may be used to just
  2124. View an ASCII file.) If the Checkbox is checked on, any
  2125. reference to a primary key is ignored by this procedure.
  2126.  
  2127. Also, a checkbox is available to display the queue in reverse
  2128. order. When the Record Order checkbox is not checked, the
  2129. Reverse Order checkbox will display the file in reverse key
  2130. order. If Both the Record Order checkbox, and the Reverse Order
  2131. checkbox are on then the file will be displayed in reverse
  2132. record order.
  2133.  
  2134. A set of display-only fields can be designated as "hot fields"
  2135. on screen.  Hot fields display values from the record currently
  2136. highlighted by the selector bar and change whenever the selector
  2137. bar moves.  This allows display of more information from the
  2138. highlighted record than just the one line in the List box.
  2139. These hot fields MUST appear consecutively in the Field List but
  2140. may be placed anywhere on screen.
  2141.  
  2142. <Formatter Support>
  2143. Formatter Support
  2144.  
  2145. The "List" procedure in CLARION.APP is pre-loaded with a screen
  2146. layout containing a list box and pushbuttons named "Insert",
  2147. "Change", "Delete", and "Exit".  The field equate label of the
  2148. list box must be "?List".
  2149.  
  2150. The horizontal scroll bar can be turned off if the required
  2151. information fits in the list box.  The vertical scroll bar is
  2152. also optional.  All other properties of the list box can be
  2153. changed.
  2154.  
  2155. Fields from related files may be scrolled in the list box as
  2156. "lookups" will be done automatically from the Primary file in
  2157. the file schematic to Secondary files with a "Many to 1"
  2158. relationship.
  2159.  
  2160. The "Insert", "Change", and "Delete" pushbuttons call an update
  2161. procedure to process the selected record.  (The update procedure
  2162. is now normally created with a "Form" template.) The name of the
  2163. procedure must be entered as the "Update Procedure".  If there
  2164. is no update procedure, these pushbuttons can be deleted. If all
  2165. three pushbuttons are deleted, yet an update procedure exists,
  2166. the Insert, Enter and Delete keys will Insert, Change and Delete
  2167. while the list box is selected. However, If only one or two of
  2168. these buttons have been removed the function of that button
  2169. (Insert, Change, or Delete) will be removed from the list box as
  2170. well and no update procedure will be called.  The "Exit"
  2171. pushbutton should not be deleted.
  2172.  
  2173. Local data is generated before the screen structure.  If a
  2174. pulldown structure has been created by the Pulldown Menu
  2175. Formatter, it is generated after the screen structure.  The
  2176. template makes no provision for opening or closing a pulldown
  2177. menu.  Such statements must be entered as embedded source. The
  2178. Report Formatter is not supported.
  2179.  
  2180. <Property Fields>
  2181. Property Fields
  2182.  
  2183. <  Range Limit Field:>
  2184. Range Limit Field:
  2185.      The range of records to be displayed can be limited by fixing
  2186.      the value of a component of the primary file access key.  For
  2187.      example, line items on an invoice can be limited to a single
  2188.      invoice.  The key for the item file might contain ITM:Invoice
  2189.      and ITM:Line containing the invoice number and line number of
  2190.      the item.
  2191.  
  2192.      ITM:Invoice would be the Range Limit Field, displaying only
  2193.      those records for a fixed invoice number.
  2194.  
  2195. <  Range Value Field:>
  2196. Range Value Field:
  2197.      The Range Value Field is the field which holds the value to
  2198.      be used as the limiting key component value.  The key
  2199.      component will be assigned this value.
  2200.  
  2201.      In this example, the current Invoice record might contain the
  2202.      number of the invoice that is being displayed.  INV:Number
  2203.      would be the Range Value Field, supplying the value for the
  2204.      Range Limit Field.  The Range Value Field must not be the
  2205.      same field as the Range Limit Field.
  2206.  
  2207. <  Record Filter:>
  2208. Record Filter:
  2209.      There are 2 ways to enter a record filter:
  2210.  
  2211.      The formula generator can be used with a formula class of
  2212.      'FILTER' to validate the expression as entered.
  2213.  
  2214.      Enter a free-form record filter expression in this field.  No
  2215.      validation is done on the code you enter -- an invalid
  2216.      expression will generate compiler errors.  If you are not
  2217.      familiar with the Clarion language statements or expressions,
  2218.      do not use this entry -- use a Formula field with the FILTER
  2219.      Formula Class instead.
  2220.  
  2221. <  Update Procedure:>
  2222. Update Procedure:
  2223.      Enter the name of the update procedure to be used to insert,
  2224.      change, or delete records.  If no update procedure is
  2225.      entered, the "Insert", "Change", and "Delete" pushbuttons
  2226.      should be removed from the screen layout.
  2227.  
  2228.      Special considerations may exist when using ASCII, DOS, and
  2229.      BASIC file drivers.  In some cases a PUT or DELETE is not
  2230.      allowed.  See the file driver's documentation for file driver
  2231.      specifics.
  2232.  
  2233. <  First Hot Field:>
  2234. First Hot Field:
  2235.      Hot fields are a set of display-only fields that display the
  2236.      contents of the record under the selector bar.  They must
  2237.      appear consecutively in the Field List.
  2238.  
  2239.      Enter the name of the first hot field.
  2240.  
  2241. <  Last Hot Field:>
  2242. Last Hot Field:
  2243.      Enter the name of the last hot field.
  2244.  
  2245. <  Enable Hot Records >
  2246. [√] Enable Hot Records
  2247.      By enabling hot records the programmer has complete control
  2248.      at every list box movement from the Browse manager. With this
  2249.      option enabled, every movement of the point bar gets the
  2250.      record under the point bar into memory, looks up any many to
  2251.      one secondary files, computes any general formulas and
  2252.      executes any embedded source code which was entered in the
  2253.      'Process Selected Record' code window.
  2254.  
  2255. <  Queue Rebuild>
  2256. [√] Queue Rebuild
  2257.      This checkbox causes the QUEUE to be rebuilt after each call
  2258.      to the update procedure.  This is suggested when using shared
  2259.      files, or when calling a form with multiple add capability.
  2260.  
  2261. <  Record Order >
  2262. [√] Record Order
  2263.      Checking this box causes the template to ignore any key file
  2264.      access information.  The following must be considered:
  2265.  
  2266.      - The Access Key in the File Schematic will be ignored.
  2267.      - Range Limits will not be used.
  2268.  
  2269.      This option was created to allow the view of ASCII, DOS, and
  2270.      BASIC files.
  2271.  
  2272. <  Reverse Order>
  2273. [√] Reverse Order
  2274.      This checkbox will reverse the order in which the Queue will
  2275.      be built.  This allows a reverse key file listing of records
  2276.      in file systems which do not support descending keys.
  2277.  
  2278. <  Progress Indicator>
  2279. [√] Progress Indicator
  2280.      Checking the Progress Indicator Checkbox will display a
  2281.      moving bar across the screen as records are loaded into the
  2282.      QUEUE.  The bar is displayed in the Local Data variable named
  2283.      StatusLine which has been pre loaded into the Default
  2284.      Application file.  This line has also been placed on the
  2285.      default screen for the List template and must be in the
  2286.      screen list after the list box.
  2287.  
  2288. <  Progress Character:>
  2289. Progress Character:
  2290.      You may enter the ASCII character to be used as the 'bar.'
  2291.      Easy entry of high order ascii characters may be made by
  2292.      using the ASCII value found in the ASCII chart from the Tools
  2293.      menu.  The ASCII value should be surrounded by angle brackets
  2294.      within single quotes.  The Default Application file is
  2295.      preloaded with a shaded bar character '<176>'.
  2296.  
  2297. <Embedded Source>
  2298. Embedded Source
  2299.  
  2300. <  Data Section>
  2301. "Data Section"
  2302.      In the data section of the procedure after local data, the
  2303.      screen and pulldown structures.  This may be used to declare
  2304.      any data which you may want to use only in your embedded
  2305.      source code.
  2306.  
  2307. <  Setup Procedure>
  2308. "Setup Procedure"
  2309.      After the CODE statement.
  2310.  
  2311. <  Setup Screen>
  2312. "Setup Screen"
  2313.      After OPEN(Screen) statement.
  2314.  
  2315. <  Setup Pulldown>
  2316. "Setup Pulldown"
  2317.      After OPEN(PullDown) statement.
  2318.  
  2319. <  LIST Class Formula>
  2320. "LIST Class Formula"
  2321.      After generation of LIST class formulas.  This embedded code
  2322.      window may be used instead of LIST class formulas.  This will
  2323.      allow setting up any fields which are displayed within the
  2324.      scrolling listbox.
  2325.  
  2326. <  End of General Formulas>
  2327. "End of General Formulas"
  2328.      When processing a screen field, the formulas which do not
  2329.      have a class of 'FILTER' of 'LIST' will be generated.  This
  2330.      embedded source window allows the entry of computations for
  2331.      screen display fields without the use of the formula
  2332.      formatter.
  2333.  
  2334. <  Process Selected Record>
  2335. "Process Selected Record"
  2336.      NOTE:  THIS EMBED IS ONLY GENERATED IF YOU HAVE HOT RECORDS
  2337.             ENABLED.
  2338.  
  2339.      Code entered in this EMBED will be placed in the FIELD()
  2340.      processing of ?LIST, directly before the handling of
  2341.      KEYCODE().
  2342.  
  2343. <  End of Procedure>
  2344. "End of Procedure"
  2345.      Code placed in this window executes after all other code in
  2346.      the procedure has executed.  This code begins in column one,
  2347.      therefore you may use this window to write any ROUTINEs which
  2348.      are called from any other embedded source code window.
  2349.  
  2350. <  When Screen Field is Selected : >
  2351. "When Screen Field is Selected : "
  2352.      In the CASE SELECTED() structure, executed when the field is
  2353.      selected for entry.
  2354.  
  2355. <  When Screen Field is Completed: >
  2356. "When Screen Field is Completed: "
  2357.      In the CASE FIELD() structure, executed when the field has
  2358.      been completed.
  2359.  
  2360. <Formula Classes>
  2361.  Formula Classes
  2362.  
  2363. <  FILTER>
  2364. FILTER
  2365.      A conditional formula of class "FILTER" created by the
  2366.      Formula Formatter is used to select which records are
  2367.      displayed.  If the conditional formula evaluates to zero
  2368.      (false) for a given record, it is not displayed.
  2369.  
  2370. <  LIST >
  2371. LIST
  2372.      A Conditional or Computed Field with "LIST" in the Formula
  2373.      Class field is used for those values which will be displayed
  2374.      in the list box and are only evaluated when the list box item
  2375.      is created.
  2376.  
  2377. <  No class (blank)>
  2378. No class (blank)
  2379.      Calculates the formula every time any field on the screen is
  2380.      completed.  The calculation code is generated before the
  2381.      field setup routines at the top of the processing LOOP.
  2382.  
  2383.  
  2384. <<The Lookup Template>>
  2385. <General Information>
  2386.  
  2387. The "Lookup" template generates a procedure that will be used to
  2388. preform entry field verification.  The procedure MUST be called
  2389. as a When Field is Selected Procedure on the entry field to
  2390. validate.  When the entry field has been selected, the Lookup
  2391. procedure will be called to check for the existence of the value
  2392. in the current field against the specified key. If no match is
  2393. found a screen with a list box is presented to allow the user to
  2394. select a valid entry.
  2395.  
  2396. Selected fields from the data file are displayed as columns in
  2397. a list box.  Columns that do not fit in the list box are
  2398. displayed using the horizontal scroll bar or the left and right
  2399. arrow keys.
  2400.  
  2401. A selector bar is always positioned over a single row.  The up
  2402. and down arrow keys move the selector bar.  Moving the selector
  2403. bar up off the top row or down off the bottom row scrolls a new
  2404. record into the list box.  The PGUP and PGDN keys scroll the
  2405. prior and next pages of records into the list box.  CTRL-PGUP
  2406. displays the first page of records and CTRL-PGDN displays the
  2407. last page of records.  Pressing the right mouse button in the
  2408. top half of the list box scrolls up and in the bottom half
  2409. scrolls down.  The ENTER key and the mouse double-click selects
  2410. the highlighted record and completes the procedure.
  2411.  
  2412. The Lookup Template uses PRESS to place the selected value into
  2413. the entry field it was called to validate.  Therefore, if
  2414. numeric data is being validated, the typing mode of that field
  2415. should be INSERT.  This allows PRESS to put the correct value
  2416. into the field.
  2417.  
  2418. The "Select", "Insert" and "Change" pushbuttons, or any other
  2419. field that processes the record under the selector bar must be
  2420. placed after the LIST field in the Field List.
  2421.  
  2422. An optional locator field finds a specific record in the file.
  2423. Typing any letter while the LIST field is active selects the
  2424. locator field.  Completing the locator field with a TAB key or
  2425. mouse CLICK displays the closest matching record at the top of
  2426. the list box.  Another option is an "incremental locator", which
  2427. allows a half-second pause for user entry into a locator field,
  2428. and then automatically finds the closest matching record to the
  2429. contents in the locator field.  The backspace key is active
  2430. during this process.  For numeric data types, it is recommended
  2431. to use a string picture type (for display purposes).  Date
  2432. fields are not recommended for incremental locators.
  2433.  
  2434. A set of display-only fields can be designated as "hot fields"
  2435. on screen.  Hot fields display values from the record currently
  2436. highlighted by the selector bar and change whenever the selector
  2437. bar moves.  This allows display of more information from the
  2438. highlighted record than just the one line in the List box.
  2439. These hot fields MUST appear consecutively in the Field List but
  2440. may be placed anywhere on screen.
  2441.  
  2442. When you define a SUM or AVG formula class, total field code
  2443. generation is automatically enabled.
  2444.  
  2445. <Formatter Support>
  2446. Formatter Support
  2447.  
  2448. The "Lookup" procedure in CLARION.APP is pre-loaded with a
  2449. screen layout containing a list box and pushbuttons named
  2450. "Select", "Insert", "Change" and "Exit". The field equate label
  2451. of the list box MUST be "?List" and the "Immediate" attribute
  2452. MUST be on turned on.  The horizontal scroll bar can be turned
  2453. off if the required information fits in the list box.  All other
  2454. properties of the list box can be changed.
  2455.  
  2456. Fields from related files may be scrolled in the list box as
  2457. "lookups" will be done automatically from the Primary file in
  2458. the file schematic to Secondary files with a "Many to 1"
  2459. relationship.  "1 to Many" relationships are not supported by
  2460. this procedure Template.
  2461.  
  2462. The "Insert" and "Change" pushbuttons call an update procedure
  2463. to process the selected record (normally created with a "Form"
  2464. template).  The name of the procedure must be entered as the
  2465. "Update Procedure".  If there is no update procedure, these
  2466. pushbuttons may be deleted.  The ENTER key and mouse DOUBLE-
  2467. CLICK while on the listbox will select the record under the
  2468. selector bar and enter the value in the entry field.  The "Exit"
  2469. pushbutton should not be deleted.
  2470.  
  2471. Local data is generated before the screen structure.  If a
  2472. pulldown structure has been created by the Pulldown Menu
  2473. Formatter, it is generated after the screen structure.  The
  2474. template makes no provision for opening or closing a pulldown
  2475. menu (you must write embedded source for this).
  2476.  
  2477. <Property Fields>
  2478. Property Fields
  2479.  
  2480. <  Range Limit Field: >
  2481. Range Limit Field:
  2482.      The range of records to be displayed can be limited by fixing
  2483.      the value of a component of the primary file access key.  For
  2484.      example, line items on an invoice can be limited to a single
  2485.      invoice.  The key for the item file might contain ITM:Invoice
  2486.      and ITM:Line containing the invoice number and line number of
  2487.      the item.
  2488.  
  2489.      ITM:Invoice would be the Range Limit Field, displaying only
  2490.      those records for a fixed invoice number.
  2491.  
  2492. <  Range Value Field: >
  2493. Range Value Field:
  2494.      The Range Value Field is the field which holds the value to
  2495.      be used as the limiting key component value.  The key
  2496.      component will be assigned this value.
  2497.  
  2498.      In this example, the current Invoice record might contain the
  2499.      number of the invoice that is being displayed.  INV:Number
  2500.      would be the Range Value Field, supplying the value for the
  2501.      Range Limit Field.  The Range Value Field must not be the
  2502.      same field as the Range Limit Field.
  2503.  
  2504. <  Record Filter:>
  2505. Record Filter:
  2506.      There are 2 ways to enter a record filter:
  2507.  
  2508.      The formula generator can be used with a formula class of
  2509.      'FILTER' to validate the expression as entered.
  2510.  
  2511.      Enter a free-form record filter expression in this field.  No
  2512.      validation is done on the code you enter -- an invalid
  2513.      expression will generate compiler errors.  If you are not
  2514.      familiar with the Clarion language statements or expressions,
  2515.      do not use this entry -- use a Formula field with the FILTER
  2516.      Formula Class instead.
  2517.  
  2518. <  Lookup Field: >
  2519. Lookup Field:
  2520.      Enter the name of the field to be used to validate against
  2521.      your entry field.  This field should be the only field in a
  2522.      single-component unique key.
  2523.  
  2524. <  Input Field Picture: >
  2525. Input Field Picture:
  2526.      Some fields do not appear on screen in the same format as the
  2527.      data exists in the file (and in the key).  These fields must
  2528.      have an Input Field Picture to DEFORMAT the data for
  2529.      validation and to FORMAT the selected data for on-screen
  2530.      display.
  2531.  
  2532.      Enter the display picture to DEFORMAT the data for
  2533.      validation.  This picture is also used to FORMAT the data to
  2534.      PRESS it into the keyboard buffer and fill the entry field
  2535.      when a record is selected from this procedure's list.
  2536.  
  2537.      Examples of fields which require an Input Field Picture:
  2538.  
  2539.      Any STRING, CSTRING, or PSTRING with an implied decimal
  2540.      storage picture (for example, @N6v2).
  2541.  
  2542.      Any numeric data field (LONG, DATE, USHORT, etc.) with a date
  2543.      (@D1, @D2, etc.) or time (@T1, @T2, etc.) display picture.
  2544.  
  2545.      Any numeric data field (REAL, BFLOAT, etc.) with a display
  2546.      picture which includes a decimal portion (for example,
  2547.      @N6.2).
  2548.  
  2549. <  Locator Field: >
  2550. Locator Field:
  2551.      A locator field is a screen entry field that updates a
  2552.      component of the primary file access key.  When a locator
  2553.      field is entered, the closest matching record is displayed in
  2554.      the list box.
  2555.  
  2556.      For example, scrolling a vendor file in vendor name sequence
  2557.      uses a key that contains the vendor name field (e.g.
  2558.      VND:Name).  To create a vendor name locator field, place a
  2559.      VND:Name entry field on the screen below the list box and
  2560.      enter VND:Name for the Locator Field.
  2561.  
  2562.      Once the user types a character on the keyboard, the locator
  2563.      field is selected and allows entry for the match.  Pressing
  2564.      the Tab key positions the point bar to the closest match.
  2565.  
  2566.      Another option is "Incremental Locator".  This template
  2567.      option allows one-half second for the user to type a new
  2568.      letter into the locator field.  At each pause longer than
  2569.      one-half second, the field contents are used to locate the
  2570.      closest match (the Tab key does not need to be pressed).  The
  2571.      backspace key is active during this process.
  2572.  
  2573. <  Incremental Locator  >
  2574. [√] Incremental Locator
  2575.      Check this box to indicate that the Locator Field will act as
  2576.      an incremental locator.
  2577.  
  2578. <  Display Key: >
  2579. Display Key:
  2580.      If using one key for entry field validation and another key
  2581.      as the display key, enter the name of the display key here.
  2582.      Otherwise, leave this field blank.
  2583.  
  2584. <  Update Procedure: >
  2585. Update Procedure:
  2586.      Enter the name of the update procedure to be used to insert,
  2587.      change, or delete records.  If no update procedure is
  2588.      entered, the "Insert", "Change", and "Delete" pushbuttons
  2589.      should be removed from the screen layout.
  2590.  
  2591. <  First Hot Field: >
  2592. First Hot Field:
  2593.      Hot fields are a set of display-only fields that display the
  2594.      contents of the record under the selector bar.  They must
  2595.      appear consecutively in the Field List.
  2596.  
  2597.      Enter the name of the first hot field.
  2598.  
  2599. <  Last Hot Field: >
  2600. Last Hot Field:
  2601.      Enter the name of the last hot field.
  2602.  
  2603. <  Enable Hot Records >
  2604. [√] Enable Hot Records
  2605.      By enabling hot records the programmer has complete control
  2606.      at every list box movement from the Browse manager. With this
  2607.      option enabled, every movement of the point bar gets the
  2608.      record under the point bar into memory, looks up any many to
  2609.      one secondary files, computes any general formulas and
  2610.      executes any embedded source code which was entered in the
  2611.      'Process Selected Record' code window.
  2612.  
  2613. <Embedded Source>
  2614. Embedded Source
  2615.  
  2616. <  Data Section >
  2617. "Data Section"
  2618.      In the data section of the procedure after local data, the
  2619.      screen and pulldown structures.  This may be used to declare
  2620.      any data which you may want to use only in your embedded
  2621.      source code.
  2622.  
  2623. <  Setup Procedure >
  2624. "Setup Procedure"
  2625.      After the CODE statement.
  2626.  
  2627. <  Setup Screen >
  2628. "Setup Screen"
  2629.      After OPEN(Screen).
  2630.  
  2631. <  Setup Pulldown>
  2632. "Setup Pulldown"
  2633.      After OPEN(PullDown) statement.
  2634.  
  2635. <  Set to First Record Before Total Loop>
  2636. "Set to First Record Before Total Loop"
  2637.      After the SET(key,key) for Range limits before beginning the
  2638.      total calculation LOOP.
  2639.  
  2640. <  Inside Total Loop, Immediately after NEXT>
  2641. "Inside Total Loop, Immediately after NEXT"
  2642.      Immediately after each record is read in the total
  2643.      calculation LOOP.
  2644.  
  2645. <  Inside Total Loop after Filter>
  2646. "Inside Total Loop after Filter"
  2647.      After each record is read and filter conditions are evaluated
  2648.      in the total calculation LOOP.
  2649.  
  2650. <  After Total Field Loop>
  2651. "After Total Field Loop"
  2652.      After all totals have been calculated.
  2653.  
  2654. <  LIST Class Formula>
  2655. "LIST Class Formula"
  2656.      After generation of LIST class formulas.  This embedded code
  2657.      window may be used instead of LIST class formulas.  This will
  2658.      allow setting up any fields which are displayed within the
  2659.      scrolling listbox.
  2660.  
  2661. <  End of General Formulas>
  2662. "End of General Formulas"
  2663.      When processing a screen field, the formulas which do not
  2664.      have a class of 'FILTER' of 'LIST' will be generated.  This
  2665.      embedded source window allows the entry of computations for
  2666.      screen display fields without the use of the formula
  2667.      formatter.
  2668.  
  2669. <  Case of No Records Found>
  2670. "Case of No Records Found"
  2671.      When no records are found to display.
  2672.  
  2673. <  After Filter and Range Check>
  2674. "After Filter and Range Check"
  2675.      After any record filter or Range limits are evaluated.
  2676.  
  2677. <  Set to First Record>
  2678. "Set to First Record"
  2679.      When using Range Limits, a SET statement is issued to locate
  2680.      the first record. This embedded source code window appears
  2681.      just after the SET statement and allows you to override the
  2682.      SET.
  2683.  
  2684. <  Set to Last Record>
  2685. "Set to Last Record"
  2686.      When using Range Limits, a SET statement is used to locate
  2687.      the closest match to the last record.  This embedded source
  2688.      code window appears just after the SET statement and allows
  2689.      you to override the SET.
  2690.  
  2691. <  Process Selected Record>
  2692. "Process Selected Record"
  2693.      When Enable Hot Records has been checked, code within this
  2694.      embedded source window will be executed upon movement of the
  2695.      point bar.  The record under the point bar will be retrieved
  2696.      into memory, any many to one secondary file records will be
  2697.      retrieved and any general formulas will be computed just
  2698.      prior to the insertion of this embedded source code.
  2699.  
  2700. <  End of Procedure>
  2701. "End of Procedure"
  2702.      Code placed in this window executes after all other code in
  2703.      the procedure has executed.  This code begins in column one,
  2704.      therefore you may use this window to write any ROUTINEs which
  2705.      are called from any other embedded source code window.
  2706.  
  2707. <  Prior to Update Procedure>
  2708. "Prior to Update Procedure"
  2709.      Immediately before the Update Procedure is called.
  2710.  
  2711. <  After Update Procedure>
  2712. "After Update Procedure"
  2713.      Immediately after return from the Update Procedure.
  2714.  
  2715. <  When Screen Field is Selected : >
  2716. "When Screen Field is Selected : "
  2717.      In the CASE SELECTED() structure, executed when the field is
  2718.      selected for entry.
  2719.  
  2720. <  When Screen Field is Completed: >
  2721. "When Screen Field is Completed: "
  2722.      In the CASE FIELD() structure, executed when the field has
  2723.      been completed.
  2724.  
  2725. <Formula Classes>
  2726. Formula Classes
  2727.  
  2728. <  LIST >
  2729. LIST
  2730.      A Conditional or Computed Field with "LIST" in the Formula
  2731.      Class field is used for those values which will be displayed
  2732.      in the list box and are only evaluated when the list box item
  2733.      is created.
  2734.  
  2735. <  SUM >
  2736. SUM
  2737.      A Computed Field with "SUM" in the Formula Class field
  2738.      calculates the total of the values contained in the field
  2739.      named in the Expression.  A Conditional Field with "SUM" in
  2740.      the Formula Class field conditionally calculates the total of
  2741.      the values contained in the fields named in the True and
  2742.      False Expressions.
  2743.  
  2744. <  AVG >
  2745. AVG
  2746.      A Computed Field with "AVG" in the Formula Class field
  2747.      calculates the arithmetic mean of the field named in the
  2748.      Expression.  A Conditional Field with "AVG" in the Formula
  2749.      Class field conditionally calculates the arithmetic mean of
  2750.      the fields named in the True and False Expressions.  In both
  2751.      cases, the total value is calculated, then divided by the
  2752.      number of records read to achieve that total.
  2753.  
  2754. <  No class (blank) >
  2755. No class (blank)
  2756.      Calculates the formula every time any field on the screen is
  2757.      completed.  The calculation code is generated before the
  2758.      field setup routines at the top of the processing LOOP.
  2759.  
  2760.  
  2761. <<The MemForm21 Template>>
  2762. <General Information>
  2763.  
  2764. The "MemForm21" template generates a procedure that processes a
  2765. screen created with the Screen Formatter.  The "MemForm21"
  2766. template is similar to a verion 2.1 "Form procedure using the
  2767. MEMORY file".   Therefore, it does not automatically write any
  2768. record to disk.  It  supports the (non-CUA) version 2.1
  2769. keystrokes:
  2770.  
  2771.   CtrlEsc ----------- Cancel
  2772.   CtrlEnter --------- Done
  2773.   Enter ------------- Field complete or Done (on last field)
  2774.   Esc --------------- Field return or Cancel (on first field)
  2775.  
  2776. <Formatter Support>
  2777. Formatter Support
  2778.  
  2779. The "MemForm21" procedure in CLARION.APP is pre-loaded with an
  2780. empty screen layout.  Local data is generated before the screen
  2781. structure.  If a pulldown structure has been created by the
  2782. Pulldown Menu Formatter, it is generated after the screen
  2783. structure.  The template makes no provision for opening or
  2784. closing a pulldown menu, or any files.  Such statements must be
  2785. entered as embedded source.  Statements from the Formula
  2786. Formatter  are generated at the top of the keyboard loop before
  2787. the field setup routines.  The Report Formatter is not
  2788. supported.
  2789.  
  2790. <Property Fields>
  2791. Property Fields
  2792.  
  2793. <  Next Procedure>
  2794. Next Procedure
  2795.      Enter the Procedure to call when the Ok button is pressed (or
  2796.      the screen has been "completed").
  2797.  
  2798. <Embedded Source>
  2799. Embedded Source
  2800.  
  2801. <  Data Section >
  2802. "Data Section"
  2803.      In the data section of the procedure, after local data and
  2804.      the report structure.  This may be used to declare any data
  2805.      which you may want to use only in your embedded source code.
  2806.  
  2807. <  Setup Procedure >
  2808. "Setup Procedure"
  2809.      After the CODE statement.
  2810.  
  2811. <  Setup Screen >
  2812. "Setup Screen"
  2813. After OPEN(Screen).
  2814.  
  2815. <  When Screen Field is Selected : >
  2816. "When Screen Field is Selected : "
  2817.      In the CASE SELECTED() structure, executed when the field is
  2818.      selected for entry.
  2819.  
  2820. <  When Screen Field is Completed: >
  2821. "When Screen Field is Completed: "
  2822.      In the CASE FIELD() structure, executed when the field has
  2823.      been completed.
  2824.  
  2825. <Formula Classes>
  2826. Formula Classes
  2827.  
  2828. <  SETUP >
  2829. SETUP
  2830.      A Conditional or Computed Field with "SETUP" in the Formula
  2831.      Class field is calculated once at the beginning of the
  2832.      procedure before the screen field processing LOOP.
  2833.  
  2834. <  RETURN >
  2835. RETURN
  2836.      A Conditional or Computed Field with "RETURN" in the Formula
  2837.      Class field is calculated once just before the return from
  2838.      the procedure when the user selects the 'Ok' button.
  2839.  
  2840. <  PRIMEKEY >
  2841. PRIMEKEY
  2842.      A Conditional or Computed Field with "PRIMEKEY" in the
  2843.      Formula Class field is calculated just before the
  2844.      SET(Key,Key) during an Autoincrement ADD.  It is inserted
  2845.      again right before the ADD(File) to preserve any components
  2846.      you have primed.
  2847.  
  2848.      This can be used to prime key components to enable subset
  2849.      numbering. For example, it can be used to cause autonumbering
  2850.      of line item numbers on an invoice.  If you have defined a
  2851.      key with the fields InvoiceNumber and LineItemNo, supply the
  2852.      current InvoiceNumber as a PRIMEKEY Formula.  The AutoNumber
  2853.      Routine determines the next available LineItemNo for that
  2854.      invoice.  The record ADDed to the file will already have
  2855.      InvoiceNumber and LineItemNo in the record buffer and on
  2856.      disk.
  2857.  
  2858. <  No class (blank) >
  2859. No class (blank)
  2860.      Calculates the formula every time any field on the screen is
  2861.      completed.  The calculation code is generated before the
  2862.      field setup routines at the top of the processing LOOP.
  2863.  
  2864.  
  2865. <<The Menu Template>>
  2866. <General Information>
  2867.  
  2868. The "Menu" template generates a procedure that displays a pop-up
  2869. menu used to execute other procedures.  Menu items are placed on
  2870. screen as BUTTON in the Screen Formatter.  The procedure
  2871. associated with each button must be its When Button is Pressed
  2872. Procedure.  At least one button field should have a "RETURN"
  2873. procedure call to exit the "Menu" procedure.
  2874.  
  2875. Other fields can be placed on the screen.  However, this
  2876. template makes no provision for accessing or updating data
  2877. files.
  2878.  
  2879. <Formatter Support>
  2880. Formatter Support
  2881.  
  2882. The "Menu" procedure in CLARION.APP is preloaded with a screen
  2883. layout containing a pushbutton named "Exit".  The "Exit"
  2884. pushbutton calls the "RETURN" procedure.  The "Exit" pushbutton
  2885. can be renamed, but if it is deleted, some other provision must
  2886. be made to return from the procedure.
  2887.  
  2888. Local data is generated before the screen structure.  If a
  2889. pulldown menu has been created by the Pulldown Menu Formatter,
  2890. it is generated after the screen structure.  However, the "Menu"
  2891. template makes no provision for opening or closing a pulldown
  2892. menu.  Such statements must be entered as embedded source.
  2893.  
  2894. The Report Formatter is not supported.
  2895.  
  2896. <Embedded Source>
  2897. Embedded Source
  2898.  
  2899. <  Data Section >
  2900. "Data Section"
  2901.      In the data section of the procedure after local data, the
  2902.      screen and pulldown structures.  This may be used to declare
  2903.      any data which you may want to use only in your embedded
  2904.      source code.
  2905.  
  2906. <  Setup Procedure >
  2907. "Setup Procedure"
  2908.      After the CODE statement.
  2909.  
  2910. <  Setup Screen >
  2911. "Setup Screen"
  2912.      After OPEN(Screen).
  2913.  
  2914. <  Top of Accept Loop>
  2915. "Top of Accept Loop"
  2916.      Immediately after the LOOP statement which processes each
  2917.      screen field.
  2918.  
  2919. <  End of Procedure>
  2920. "End of Procedure"
  2921.      Code placed in this window executes after all other code in
  2922.      the procedure has executed.  This code begins in column one,
  2923.      therefore you may use this window to write any ROUTINEs which
  2924.      are called from any other embedded source code window.
  2925.  
  2926. <  When Screen Field is Selected : >
  2927. "When Screen Field is Selected : "
  2928.      In the CASE SELECTED() structure, executed when the field is
  2929.      selected for entry.
  2930.  
  2931. <  When Screen Field is Completed: >
  2932. "When Screen Field is Completed: "
  2933.      In the CASE FIELD() structure, executed when the field has
  2934.      been completed.
  2935.  
  2936. <Formula Classes>
  2937. Formula Classes
  2938.  
  2939. No formula classes are supported by this procedure Template.
  2940. All statements from the Formula Formatter are generated at the
  2941. top of the keyboard loop before the field setup routines.
  2942.  
  2943.  
  2944. <<The Menu21 Template>>
  2945. <General Information>
  2946.  
  2947. The "Menu21" template generates a procedure that displays a
  2948. pop-up menu used to execute other procedures.  This is provided
  2949. for conversion of version 2.1 Menu Procedures.  The difference
  2950. between the "Menu" and "Menu21" procedure Templates are their
  2951. handling of the Esc and CtrlEsc keys.
  2952.  
  2953. Menu items are placed on screen as BUTTON fields in the Screen
  2954. Formatter.  The procedure associated with each button must be
  2955. its When Button is Pressed Procedure.
  2956.  
  2957. Other fields can be placed on the screen.  However, this
  2958. template makes no provision for accessing or updating data
  2959. files.
  2960.  
  2961. <Formatter Support>
  2962. Formatter Support
  2963.  
  2964. The "Menu21" procedure in CLARION.APP is preloaded with a screen
  2965. layout containing a pushbutton named "Exit".  The "Exit"
  2966. pushbutton calls the "RETURN" procedure.  The "Exit" pushbutton
  2967. can be renamed.
  2968.  
  2969. Local data is generated before the screen structure.  If a
  2970. pulldown menu has been created by the Pulldown Menu Formatter,
  2971. it is generated after the screen structure.  However, the "Menu"
  2972. template makes no provision for opening or closing a pulldown
  2973. menu.  Such statements must be entered as embedded source.
  2974.  
  2975. The Report Formatter is not supported.
  2976.  
  2977. <Embedded Source>
  2978. Embedded Source
  2979.  
  2980. <  Data Section >
  2981. "Data Section"
  2982.      In the data section of the procedure after local data, the
  2983.      screen and pulldown structures.  This may be used to declare
  2984.      any data which you may want to use only in your embedded
  2985.      source code.
  2986.  
  2987. <  Setup Procedure >
  2988. "Setup Procedure"
  2989.      After the CODE statement.
  2990.  
  2991. <  Setup Screen >
  2992. "Setup Screen"
  2993.      After OPEN(Screen).
  2994.  
  2995. <  Computed Fields>
  2996. "Computed Fields"
  2997.      Immediately after the any Formulas are calculated.
  2998.  
  2999. <  End of Procedure>
  3000. "End of Procedure"
  3001.      Code placed in this window executes after all other code in
  3002.      the procedure has executed.  This code begins in column one,
  3003.      therefore you may use this window to write any ROUTINEs which
  3004.      are called from any other embedded source code window.
  3005.  
  3006. <  When Screen Field is Selected : >
  3007. "When Screen Field is Selected : "
  3008.      In the CASE SELECTED() structure, executed when the field is
  3009.      selected for entry.
  3010.  
  3011. <  When Screen Field is Completed: >
  3012. "When Screen Field is Completed: "
  3013.      In the CASE FIELD() structure, executed when the field has
  3014.      been completed.
  3015.  
  3016. <Formula Classes>
  3017. Formula Classes
  3018.  
  3019. <  RETURN >
  3020. RETURN
  3021.      A Conditional or Computed Field with "RETURN" in the
  3022.      Formula Class field is calculated just before the
  3023.      return from the procedure when the user exits the
  3024.      procedure.
  3025.  
  3026. <  Blank (no class)>
  3027. Blank (no class)
  3028.      All formulas are generated at the top of the keyboard
  3029.      loop before the field setup routines.
  3030.  
  3031.  
  3032. <<The MultiPage Template>>
  3033. <General Information>
  3034.  
  3035. The "MultiPage" template is designed to work in conjunction with
  3036. the "PageOf" procedure template.  The "MultiPage" template
  3037. generates a procedure that will ADD, CHANGE or DELETE a
  3038. record from the procedures Primary data file.  The template
  3039. allows for multiple auto-increment key fields and
  3040. concurrency checks of multiple memo fields.  Relational
  3041. integrity constraints are enforced from the Primary file
  3042. down its relational tree, for all 1:MANY relationships.
  3043.  
  3044. The MultiPage and the PageOf templates are designed to work
  3045. together.  All file I/O is done by the MultiPage procedure.
  3046. Access to the PageOf procedures is handled thru MultiPage.  The
  3047. PageOf procedures are expected to use the same data file as the
  3048. MultiPage procedure. MultiPage passes each PageOf procedure
  3049. the (4) following parameters: the current Action (Add /
  3050. Change / Delete / Check_Required), the current Page number,
  3051. the total number of Pages, and the Message describing the
  3052. current update.
  3053.  
  3054. ┌─────────────┐
  3055. │  MultiPage  │ ( First page of a multi-page data entry form )
  3056. └──┬──────────┘
  3057.    │             Any 'PageOf' can be accessed directly from
  3058.    │             MultiPage by pressing the Alt key and the
  3059.    │             corresponding page number. Pressing the
  3060.    │             PageDown key from any page access the next
  3061.    │             available page. Pressing PageDown on the Last
  3062.    │             Page wraps around to the main (MultiPage) page.
  3063.    │
  3064.    ├────PageOf  (the page 2 procedure)
  3065.    ├────PageOf  (the page 3 procedure)
  3066.    ├────PageOf  (the page 4 procedure)
  3067.    ├────PageOf  (the page 5 procedure)
  3068.    ├────PageOf  (the page 6 procedure)
  3069.    ├────PageOf  (the page 7 procedure)
  3070.    ├────PageOf  (the page 8 procedure)
  3071.    └────PageOf  (the page 9 procedure)
  3072.  
  3073. The template supports up to eight (8) additional pages.
  3074. The PageOf procedure calls are all entered on the MultiPage
  3075. template's Procedure Properties window. Procedures named in
  3076. the Page prompts must use the "PageOf" procedure template.
  3077.  
  3078. At runtime the generated procedure tracks which "PageOf"
  3079. procedures have been called. When the user presses 'Ok'
  3080. any "PageOf" procedure which has not yet been accessed by
  3081. the user, will be called in order to check for 'Required'
  3082. fields. The PageOf procedure is called and immediately
  3083. placed in nonstop edit mode. If a required field has been
  3084. left blank, the user is notified and placed in edit mode.
  3085.  
  3086. Initial field values from the data dictionary are
  3087. pre-loaded during an ADD.  Range checking is generated from
  3088. the data dictionary definitions and is enforced during ADD
  3089. or CHANGE.  If an out of range condition exists the user is
  3090. notified of the valid range for the field, and the cursor is
  3091. placed on that field for editing.
  3092.  
  3093. The template generates lookups for accessing secondary files
  3094. where the relationship is defined as MANY:1.
  3095.  
  3096. The "Must be in File" automatic field validation is
  3097. enforced when the user selects OK.  If the value entered
  3098. does not exist in the specified file the user is notified
  3099. and is placed back on the field.
  3100.  
  3101. If the application is set to SHARE files, the procedure
  3102. enforces multi-user concurrency checking at the record
  3103. level.  If a conflict arises from two or more workstations
  3104. attempting to update the same record, the user's Screen is
  3105. refreshed with the record as changed by the other
  3106. workstation, the user is notified of the change, and placed
  3107. back in edit mode.
  3108.  
  3109. <  Referential Integrity>
  3110. If Relational Constraints have been defined in the Data
  3111. Dictionary, code is generated to enforce the Constraint on
  3112. 1:MANY relationships. All Referential Integrity Constraints
  3113. are enforced from the Primary file for the procedure, down
  3114. its Relational File Tree for as many levels as exist.
  3115.  
  3116. <  Transaction Framing >
  3117. During a relational Change or Delete a HOLD is placed on
  3118. the Primary file record.  All child files of the Primary
  3119. file are updated within a transaction frame to ensure an
  3120. 'all or nothing' update or delete.  If LOGOUT cannot be
  3121. initiated, the user is given a chance to retry the update or
  3122. delete.
  3123.  
  3124. <  No Transaction Framing >
  3125. Not all file drivers support transaction processing. If the file
  3126. driver does not support the LOGOUT statement, code is generated
  3127. to update the files without the benefit of a transaction frame.
  3128. Also, if the files in the Relationship use multiple file drivers,
  3129. the referential update/delete cannot use the LOGOUT statement.
  3130. For example, if a file relationship is defined with one file
  3131. using the Btrieve driver and the related file using the Clarion
  3132. driver, code is generated without a LOGOUT transaction frame.
  3133. Either situation has the potential to compromise the referential
  3134. integrity of your database.  If the update/delete fails for
  3135. any reason, your files cannot be restored to their original
  3136. state.
  3137.  
  3138. Finally, if you have set up multiple relations between the
  3139. same two files, transaction framing cannot process these
  3140. relations.  This will be evident at run-time as a Clarion
  3141. Run-Time error, Cannot Logout Files.  In this case, check
  3142. the Disable RI Logout Check-box on the Procedures Property
  3143. screen.
  3144.  
  3145. <Formatter Support>
  3146. Formatter Support
  3147.  
  3148. The default screen contained in CLARION.APP has a local
  3149. variable named LOC:Message placed at the top of the entry
  3150. screen. This variable is used to inform the user of the
  3151. current action: Add, Change, or Delete of the record on the
  3152. screen.  The message displayed is stored in CLARION.APP in
  3153. the global variables GLO:InsertMsg, GLO:ChangeMsg, and
  3154. GLO:DeleteMsg respectively.
  3155.  
  3156. The programmer can enter his own messages on the Procedure
  3157. Properties window. If any Prompt for a message is filled
  3158. in, it will be used instead of the global values stored in
  3159. the default .APP file.
  3160.  
  3161. The default screen also has two local variables for page
  3162. number display; LOC:Page and LOC:Pages. These variables
  3163. are used to display the current page (LOC:Page), and the
  3164. total number of pages (LOC:Pages).
  3165.  
  3166. The template places an ALRT attribute for the Alt-# key for
  3167. each procedure named in the Page prompts.  Each page
  3168. procedure cam be called by pressing Alt and the "Page's
  3169. Procedure number" key. For example, Alt2 calls the Page2
  3170. procedure, Alt3 the Page3 procedure, and so on.
  3171.  
  3172. The default screen has three buttons; Ok, Cancel and
  3173. Next_Page. All three fields are required by the template.
  3174.  
  3175. <Property Fields>
  3176. Property Fields
  3177.  
  3178. <  Insert Message>
  3179. Insert Message
  3180.      Enter a message to use instead of the default stored
  3181.      in Clarion.app for Inserting a record.
  3182.  
  3183. <  Change Message>
  3184. Change Message
  3185.      Enter a message to use instead of the default stored
  3186.      in Clarion.app for Changing a record.
  3187.  
  3188. <  Delete Message>
  3189. Delete Message
  3190.      Enter a message to use instead of the default stored
  3191.      in Clarion.app for Deleting a record.
  3192.  
  3193. <  # Page Procedure>
  3194. # Page Procedure
  3195.      There are eight (8) Prompts for additional pages. They
  3196.      are called in their numerical order, for instance the
  3197.      '2nd Page Procedure' is called when the user presses
  3198.      either the Next_Page button, the Page Down key, or the
  3199.      Alt2 key. Name your additional Page procedure calls
  3200.      in these prompts.  These must be filled in
  3201.      consecutively -- you must not leave any "holes" in the
  3202.      list of "PageOf" procedure calls.
  3203.  
  3204. <  Next Procedure>
  3205. Next Procedure
  3206.      Enter the Procedure to call when the Ok button is
  3207.      pressed, AFTER the file's update has completed without
  3208.      any errors. The Next Procedure call is generated before
  3209.      the code for any Repeated ADDs.
  3210.  
  3211. <  Disable RI Logout>
  3212. Disable RI Logout
  3213.      If multiple CONSTRAINED relations exist between any
  3214.      two files processed by the Referential Integrity code,
  3215.      when this code is processed your program will
  3216.      experience a Clarion Run-Time halt, Cannot Logout
  3217.      Files.  Check the Disable RI Logout Check-Box to
  3218.      stop the RI code from generating.  NOTE:  ANY RI
  3219.      TRANSACTIONS will not be recoverable if an error
  3220.      occurs.
  3221.  
  3222. <Embedded Source>
  3223. Embedded Source
  3224.  
  3225. <  Data Section >
  3226. "Data Section"
  3227.      In the data section of the procedure after local data, the
  3228.      screen and pulldown structures. This may be used to
  3229.      declare any data which you may want to use only in your
  3230.      embedded source code.
  3231.  
  3232. <  Setup Procedure >
  3233. "Setup Procedure"
  3234.      Source code is inserted after the CODE statement.
  3235.  
  3236. <  Setup Screen >
  3237. "Setup Screen"
  3238.      After OPEN(Screen).
  3239.  
  3240. <  Setup Next Procedure >
  3241. "Setup Next Procedure"
  3242.      If a 'Next Procedure' was defined, code is inserted
  3243.      before the procedure is called.
  3244.  
  3245. <  Return from Next Procedure >
  3246. "Return from Next Procedure"
  3247.      If a 'Next Procedure' was defined, code is inserted
  3248.      after the procedure is executed.
  3249.  
  3250. <  Ok Button Press >
  3251. "Ok Button Press"
  3252.      Code is inserted to execute as soon as the "Ok" button is
  3253.      pressed, before going into non-stop mode.
  3254.  
  3255. <  Next Page Button Press >
  3256. "Next Page Button Press"
  3257.      Code is inserted to execute as soon as the "Next_Page"
  3258.      button is pressed, before going accessing the next
  3259.      page.
  3260.  
  3261. <  End of Procedure >
  3262. "End of Procedure"
  3263.      Code placed in this window executes after all other
  3264.      code in the procedure has executed.  This code begins
  3265.      in column one, therefore you may use this window to
  3266.      write any ROUTINEs which are called from any other
  3267.      embedded source code window.
  3268.  
  3269. <  When Screen Field is Selected : >
  3270. "When Screen Field is Selected : "
  3271.      In the CASE SELECTED() structure, executed when the
  3272.      field is selected for entry.
  3273.  
  3274. <  When Screen Field is Completed: >
  3275. "When Screen Field is Completed: "
  3276.      In the CASE FIELD() structure, executed when the field
  3277.      has been completed.
  3278.  
  3279. <Formula Classes>
  3280. Formula Classes
  3281.  
  3282. <  SETUP >
  3283. SETUP
  3284.      A Conditional or Computed Field with "SETUP" in the
  3285.      Formula Class field is calculated once at the beginning
  3286.      of the procedure before the screen field processing
  3287.      LOOP.
  3288.  
  3289. <  RETURN >
  3290. RETURN
  3291.      A Conditional or Computed Field with "RETURN" in the
  3292.      Formula Class field is calculated once just before the
  3293.      return from the procedure when the user selects the
  3294.      'Ok' button.
  3295.  
  3296. <  PRIMEKEY >
  3297. PRIMEKEY
  3298.      A Conditional or Computed Field with "PRIMEKEY" in
  3299.      the Formula Class field is calculated just before the
  3300.      SET(Key,Key) during an Autoincrement ADD. It is
  3301.      inserted again right before the ADD(File) to preserve
  3302.      any components you have primed.
  3303.  
  3304.      This can be used to prime key components to enable
  3305.      subset numbering. For example, it can be used to cause
  3306.      autonumbering of line item numbers on an invoice.  If
  3307.      you have defined a key with the fields InvoiceNumber
  3308.      and LineItemNo, supply the current InvoiceNumber as a
  3309.      PRIMEKEY Formula.  The AutoNumber Routine determines
  3310.      the next available LineItemNo for that invoice.  The
  3311.      record ADDed to the file will already have
  3312.      InvoiceNumber and LineItemNo in the record buffer and
  3313.      on disk.
  3314.  
  3315. <  No class (blank) >
  3316. No class (blank)
  3317.      Calculates the formula every time any field on the
  3318.      screen is completed.  The calculation code is generated
  3319.      before the field setup routines at the top of the
  3320.      processing LOOP.
  3321.  
  3322.  
  3323. <<The PageOf Template>>
  3324. <General Information>
  3325.  
  3326. The "PageOf" procedure template is designed to work
  3327. together with the MultiPage template. PageOf is subordinate
  3328. to MultiPage.  The PageOf procedure has no facility to
  3329. update a record on disk.  All file updates are handled by
  3330. the MultiPage template procedure.
  3331.  
  3332. A PageOf procedure's prototype in the MAP looks like:
  3333.  
  3334.      ProcName(BYTE,*BYTE,BYTE,STRING)
  3335.  
  3336. The parameters passed from the MultiPage procedure are:
  3337.  
  3338.      (Action,Page,Pages,Message)
  3339.  
  3340. The PageOf procedures are expected to use the same data
  3341. file as the MultiPage procedure.  MultiPage passes each
  3342. PageOf procedure the (4) following parameters: the current
  3343. Action (Add / Change / Delete / Check_Required), the current
  3344. Page number, the total number of Pages, and the Message
  3345. describing the current update.
  3346.  
  3347. At runtime the MultiPage procedure tracks which "PageOf"
  3348. procedures have been called. When the user presses 'Ok'
  3349. any "PageOf" procedure which has not yet been accessed by
  3350. the user will be called in order to check for 'Required'
  3351. fields. The PageOf procedure is called and immediately
  3352. placed in nonstop edit mode. If a required field has been
  3353. left blank, the user is notified and placed in edit mode.
  3354.  
  3355. Initial field values from the data dictionary are
  3356. pre-loaded during an ADD.  Range checking is generated from
  3357. the data dictionary definitions and is enforced during ADD
  3358. or CHANGE.  If an out of range condition exists the user is
  3359. notified of the valid range for the field, and the cursor
  3360. is placed on that field for editing.
  3361.  
  3362. The template will generate lookups for accessing secondary
  3363. files where the relationship is defined as MANY:1.  The
  3364. "Must be in File" automatic field validation is enforced
  3365. when the user selects 'OK'.  If the value entered does not
  3366. exist in the specified file the user is notified and is
  3367. placed back on the field.
  3368.  
  3369. If the application is set to SHARE files the MultiPage
  3370. procedure enforces multi-user concurrency checking at the
  3371. record level.
  3372.  
  3373. If Relational Constraints have been defined in the Data
  3374. Dictionary, the code generated from the MultiPage template
  3375. enforces those constraints.
  3376.  
  3377. <Formatter Support>
  3378. Formatter Support
  3379.  
  3380. The default screen contained in CLARION.APP has a local
  3381. variable named LOC:Message placed at the top of the entry
  3382. screen. This variable is used to inform the user of the
  3383. current action: Add, Change, or Delete of the record on the
  3384. screen.  The message displayed is stored in CLARION.APP in
  3385. the global variables GLO:InsertMsg, GLO:ChangeMsg, and
  3386. GLO:DeleteMsg respectively.
  3387.  
  3388. The programmer can enter his own messages on the Procedure
  3389. Properties window. If any Prompt for a message is filled
  3390. in, it will be used instead of the global values stored in
  3391. the default .APP file.
  3392.  
  3393. The default screen also has two local variables for page
  3394. number display; LOC:Page and LOC:Pages. These variables
  3395. are used to display the current page (LOC:Page), and the
  3396. total number of pages (LOC:Pages).
  3397.  
  3398. The PageUp and PageDown keys will access the next or prior
  3399. page procedures.  The CtrlPgUp and CtrlPgDn keys will call
  3400. the first or last page procedures respectively.
  3401.  
  3402. The default screen has four buttons; Base_Page,
  3403. Previous_Page, Next_Page, and Last_Page.  The Next_Page and
  3404. Previous_Page button fields are required by the template,
  3405. Base_Page and Last_Page are optional.  Pressing the
  3406. Base_Page button will return the user to the main page
  3407. (MultiPage template).  The Previous and Next Page buttons
  3408. call the next or previous page procedures.  The Last_Page
  3409. button calls the last page procedure defined on the
  3410. MultiPage procedure property screen.
  3411.  
  3412. If a Pulldown structure has been created by the Pulldown
  3413. Menu Formatter, it is generated after the screen structure.
  3414. The Pulldown is OPENed after the screen structure, and is
  3415. closed upon exit from the procedure.
  3416.  
  3417. The Report Formatter is not supported.
  3418.  
  3419. <Property Fields>
  3420. Property Fields
  3421.  
  3422. The "PageOf" Procedure Properties window has no
  3423. specialized prompts.
  3424.  
  3425. <Embedded Source>
  3426. Embedded Source
  3427.  
  3428. <  Data Section >
  3429. "Data Section"
  3430.      In the data section of the procedure after local data, the
  3431.      screen and pulldown structures. This may be used to
  3432.      declare any data which you may want to use only in
  3433.      your embedded source code.
  3434.  
  3435. <  Setup Procedure >
  3436. "Setup Procedure"
  3437.      Source code is inserted after the CODE statement.
  3438.  
  3439. <  Setup Screen >
  3440. "Setup Screen"
  3441.  
  3442. <  Base_Page Button Press >
  3443. "Base_Page Button Press"
  3444.      Code is inserted to execute as soon as the "Base Page"
  3445.      button is pressed, before going into non-stop mode and
  3446.      returning to the main (MultiPage) procedure.
  3447.  
  3448. <  Previous_Page Button Press >
  3449. "Previous_Page Button Press"
  3450.      Code is inserted to execute as soon as the "Previous
  3451.      Page" button is pressed, before going into non-stop
  3452.      mode and returning to the prior page procedure.
  3453.  
  3454. <  Next_Page Button Press >
  3455. "Next_Page Button Press"
  3456.      Code is inserted to execute as soon as the "Next_Page" button
  3457.      is pressed, before going into non-stop mode and returning to
  3458.      the next page procedure.  If Next_Page is pressed on the last
  3459.      page, the user is placed on the first page (MultiPage)
  3460.      procedure.
  3461.  
  3462. <  Last_Page Button Press >
  3463. "Last_Page Button Press"
  3464.      Code is inserted to execute as soon as the "Last Page" button
  3465.      is pressed, before going into non-stop mode and calling the
  3466.      last page procedure.
  3467.  
  3468. <  End of Procedure >
  3469. "End of Procedure"
  3470.      Code placed in this window executes after all other code in
  3471.      the procedure has executed.  This code begins in column one,
  3472.      therefore you may use this window to write any ROUTINEs which
  3473.      are called from any other embedded source code window.
  3474.  
  3475. <  When Screen Field is Selected : >
  3476. "When Screen Field is Selected : "
  3477.      In the CASE SELECTED() structure, executed when the field is
  3478.      selected for entry.
  3479.  
  3480. <  When Screen Field is Completed: >
  3481. "When Screen Field is Completed: "
  3482.      In the CASE FIELD() structure, executed when the field has
  3483.      been completed.
  3484.  
  3485. <Formula Classes>
  3486. Formula Classes
  3487.  
  3488. <  SETUP >
  3489. SETUP
  3490.      A Conditional or Computed Field with "SETUP" in the Formula
  3491.      Class field is calculated once at the beginning of the
  3492.      procedure before the screen field processing LOOP.
  3493.  
  3494. <  No class (blank) >
  3495. No class (blank)
  3496.      Calculates the formula every time any field on the screen is
  3497.      completed.  The calculation code is generated before the
  3498.      field setup routines at the top of the processing LOOP.
  3499.  
  3500. <<The Print Template>>
  3501. <General Information>
  3502.  
  3503. The "Print" template generates a procedure that prints the
  3504. report created with the Report Formatter.  This template makes
  3505. no provision for accessing data files.  Fields printed on the
  3506. report reflect their value in memory at the time the procedure
  3507. is executed.  The "Print" template is intended for printing
  3508. messages or status reports.
  3509.  
  3510. <Formatter Support>
  3511. Formatter Support
  3512.  
  3513. The "Print" procedure in CLARION.APP is pre-loaded with an empty
  3514. report layout.  Local data is generated before the report
  3515. structure.  Formulas are generated before the OPEN(Report)
  3516. statement.  The Screen and Pulldown Menu Formatters are not
  3517. supported.
  3518.  
  3519. <Property Fields>
  3520. Property Fields
  3521.  
  3522. <  Redirect Procedure: >
  3523. Redirect Procedure:
  3524.      Enter the name of a procedure which is called before the
  3525.      report is generated to allow the user to define the report's
  3526.      destination at runtime.  The Print Template assumes that the
  3527.      report's destination is in GLO:FileSpec (a global variable
  3528.      defined in CLARION.APP) after the Redirect Procedure is
  3529.      called.  Normally, the Redirect Procedure is created from the
  3530.      Redirect Template.
  3531.  
  3532. <  View Procedure: >
  3533. View Procedure:
  3534.      Enter the name of a procedure which is called after the
  3535.      report is generated to allow the user to view the report's
  3536.      output (if the user selected the SCREEN or a FILE as the
  3537.      report's destination).  Normally, the View Procedure is
  3538.      created from the View Template.  The View Template assumes
  3539.      that the report's output filename is in GLO:FileSpec (a
  3540.      global variable defined in CLARION.APP).  If the user
  3541.      selected a printer port, the Print Template clears
  3542.      GLO:FileSpec, which disables the View Procedure.
  3543.  
  3544. <Embedded Source Code>
  3545. Embedded Source Code
  3546.  
  3547. <  Data Section >
  3548. "Data Section"
  3549.      In the data section of the procedure after local data, the
  3550.      screen and pulldown structures.  This may be used to declare
  3551.      any data which you may want to use only in your embedded
  3552.      source code.
  3553.  
  3554. <  Setup Procedure >
  3555. "Setup Procedure"
  3556.      After the CODE statement.
  3557.  
  3558. <  After Report OPEN before Formulas >
  3559. "After Report OPEN before Formulas"
  3560.      After the report has been opened, and before any the Formula
  3561.      fields are calculated and before anything is printed.
  3562.  
  3563. <  After Formulas Before Title Page >
  3564. "After Formulas Before Title Page"
  3565.      After the formulas are calculated, and before anything is
  3566.      printed.
  3567.  
  3568. <  After Grand Totals Before Final Page >
  3569. "After Grand Totals Before Final Page"
  3570.      After the Title Page and Body Detail have printed, but before
  3571.      the Final Page.
  3572.  
  3573. <  After Final Page Before Close >
  3574. "After Final Page Before Close"
  3575.      After the Final Page has printed, but before the Report is
  3576.      closed.
  3577.  
  3578. <  End of Procedure >
  3579. "End of Procedure"
  3580.      Code placed in this window executes after all other code in
  3581.      the procedure has executed.  This code begins in column one,
  3582.      therefore you may use this window to write any ROUTINEs which
  3583.      are called from any other embedded source code window.
  3584.  
  3585. <  Detail Pre-Print Code for: >
  3586. "Detail Pre-Print Code for:"
  3587.      This is an implicit embedded source code window which is
  3588.      executed immediately before the Body detail band is printed.
  3589.      There is only one implicit Detail Pre-Print embedded source
  3590.      code window in the report.
  3591.  
  3592. <  Detail Post-Print Code for: >
  3593. "Detail Post-Print Code for:"
  3594.      This is an implicit embedded source code window which is
  3595.      executed immediately after the Body detail band is printed.
  3596.      There is only one implicit Detail Post-Print embedded source
  3597.      code window in the report.
  3598.  
  3599. <Formula Classes>
  3600. Formula Classes
  3601.  
  3602. No formula classes are supported by this procedure Template.
  3603. All Formulas are generated once without regard to any value in
  3604. the Formula Class field.
  3605.  
  3606.  
  3607. <<The Pulldown Template>>
  3608. <General Information>
  3609.  
  3610. The "Pulldown" template generates a procedure that displays a
  3611. pulldown menu used to execute other procedures.  Menu items are
  3612. placed in the menu with the Pulldown Menu Formatter.
  3613.  
  3614. Once in the Pulldown Menu Formatter, the menu selections which
  3615. execute procedures must have the "Execute procedure" radio
  3616. button selected and the procedure to call must be entered.
  3617. Optionally, source code may be entered instead of a procedure
  3618. name by deleting any procedure name and selecting the "Source"
  3619. pushbutton.  At least one menu item should have an edit
  3620. procedure of "RETURN" to exit the "Pulldown" procedure.
  3621.  
  3622. The code generated by the "Pulldown" procedure template operates
  3623. like code generated from the "Menu" procedure template.
  3624. Therefore, the template disables all the fields in any screen
  3625. that is active and closes the pulldown menu while its selected
  3626. procedures are executing.
  3627.  
  3628. A pulldown menu that is designed to work with a screen must be
  3629. created by the Pulldown Menu Formatter in the procedure that
  3630. contains the screen.
  3631.  
  3632. <Formatter Support>
  3633. Formatter Support
  3634.  
  3635. The "Pulldown" procedure in CLARION.APP is pre-loaded with an
  3636. empty pulldown menu.  Local data is generated before the
  3637. pulldown menu structure.  At least one menu item must contain a
  3638. menu procedure of "RETURN" to exit the pulldown procedure.
  3639. Formulas are generated at the top of the keyboard loop before
  3640. the menu item edit routines.  The Screen and Report Formatters
  3641. are not supported.
  3642.  
  3643. <Property Fields>
  3644. Property Fields
  3645.  
  3646. <  Sticky Menus >
  3647. [√] Sticky Menus
  3648.      Check this box to generate code that re-selects the last menu
  3649.      item the user selected upon return from the called procedure.
  3650.  
  3651. <  Keep Pulldown Active >
  3652. [√] Keep Pulldown Active
  3653.      Check this box to keep the Pulldown structure active
  3654.      during the execution of a Pulldown option.
  3655.  
  3656. <Embedded Source>
  3657. Embedded Source
  3658.  
  3659. <  Data Section >
  3660. "Data Section"
  3661.      In the data section of the procedure after local data, the
  3662.      screen and pulldown structures.  This may be used to declare
  3663.      any data which you may want to use only in your embedded
  3664.      source code.
  3665.  
  3666. <  Setup Procedure >
  3667. "Setup Procedure"
  3668.      After the CODE statement.
  3669.  
  3670. <  Setup Pulldown >
  3671. "Setup Pulldown"
  3672.      After OPEN(Pulldown).
  3673.  
  3674. <  Top of Accept Loop>
  3675. "Top of Accept Loop"
  3676.       At the top of the screen field processing loop.
  3677.  
  3678. <  End of Procedure >
  3679. "End of Procedure"
  3680.      Code placed in this window executes after all other code in
  3681.      the procedure has executed.  This code begins in column one,
  3682.      therefore you may use this window to write any ROUTINEs which
  3683.      are called from any other embedded source code window.
  3684.  
  3685. <  Pulldown Item Code for : >
  3686. Pulldown Item Code for :
  3687.      In the CASE FIELD() structure, executed when the menu item is
  3688.      selected by the user.
  3689.  
  3690. <Formula Classes>
  3691. Formula Classes
  3692.  
  3693. No formula classes are supported by this procedure Template.
  3694.  
  3695.  
  3696. <<The Redirect Template>>
  3697. <General Information>
  3698.  
  3699. The "Redirect" template creates a procedure which allows the
  3700. user to choose a report's destination at runtime.  The Template
  3701. code itself is very basic -- all the functionality is provided
  3702. in the default procedure in CLARION.APP.
  3703.  
  3704. There are two local variables declared which are placed on the
  3705. default screen design.  One selects the destination and the
  3706. other names the disk file if FILE is the selected destination.
  3707. The functionality of the procedure is completely contained in
  3708. the embedded source code windows for these two fields and the Ok
  3709. and Cancel buttons.
  3710.  
  3711. Once the destination is selected, it is placed in the
  3712. GLO:FileSpec global variable (as expected by the Report and View
  3713. Templates).
  3714.  
  3715. <Formatter Support>
  3716. Formatter Support
  3717.  
  3718. The "Redirect" procedure in CLARION.APP is pre-loaded with a
  3719. default screen design which allows the user to select any LPT or
  3720. COM port, the SCREEN, or to name a disk file to receive report
  3721. output.
  3722.  
  3723. The Report and Pulldown Menu Formatters are not supported.
  3724. Formulas are also not supported.
  3725.  
  3726. <Property Fields>
  3727. Property Fields
  3728.  
  3729. There are no prompts which are specific to this procedure.
  3730.  
  3731. <Embedded Source>
  3732. Embedded Source
  3733.  
  3734. <  Data Section >
  3735. "Data Section"
  3736.      In the data section of the procedure, after local data and
  3737.      the screen structure.  This may be used to declare any data
  3738.      which you may want to use only in your embedded source code.
  3739.  
  3740. <  Setup Procedure >
  3741. "Setup Procedure"
  3742.      Immediately after the CODE statement.
  3743.  
  3744. <  Setup Screen >
  3745. "Setup Screen"
  3746.      Immediately after the OPEN(Screen) statement.
  3747.  
  3748. <  Top of Accept Loop>
  3749. "Top of Accept Loop"
  3750.       At the top of the screen field processing loop.
  3751.  
  3752. <  End of Procedure >
  3753. "End of Procedure"
  3754.      Code placed in this window executes after all other code in
  3755.      the procedure has executed.  This code begins in column one,
  3756.      therefore you may use this window to write any ROUTINEs which
  3757.      are called from any other embedded source code window.
  3758.  
  3759. <  When Screen Field is Selected : >
  3760. "When Screen Field is Selected : "
  3761.      In the CASE SELECTED() structure, executed when the field is
  3762.      selected for entry.
  3763.  
  3764. <  When Screen Field is Completed: >
  3765. "When Screen Field is Completed: "
  3766.      In the CASE FIELD() structure, executed when the field has
  3767.      been completed.
  3768.  
  3769. <Formula Classes>
  3770. Formula Classes
  3771.  
  3772. Neither Formulas nor Formula Classes are supported by the
  3773. Redirect Template.
  3774.  
  3775.  
  3776. <<The Report Template>>
  3777. <General Information>
  3778.  
  3779. The "Report" template prints reports from one or multiple
  3780. related data files.  File relationships, both 1:MANY and MANY:1,
  3781. are automatically handled with some restrictions.  The files
  3782. used for the report are defined in the File Schematic built in
  3783. the File Schematic Definition window.  The first file in the
  3784. File Schematic is the Primary file, all others are Secondary
  3785. files.  A Secondary Child file (double right arrow) has a 1:MANY
  3786. relationship with the file to which it is attached in the File
  3787. Schematic.  A Secondary Lookup file (single right arrow) has a
  3788. MANY:1 relationship with the file to which it is attached in the
  3789. File Schematic.
  3790.  
  3791. The template recurses through as many levels of 1:MANY
  3792. relationships as are defined in the File Schematic, starting
  3793. with the Primary file, going down the chain of Secondary files
  3794. beginning with the first Child file of the Primary.  This
  3795. generates a set of nested LOOP structures which read all related
  3796. records from each file in turn.  The Body detail band is printed
  3797. every time a record from the lowest level Child file is read. A
  3798. second Child file of the Primary file would begin a second
  3799. 1:MANY file chain -- this is not supported by this template.
  3800.  
  3801. The Secondary Lookup (MANY:1) relationship is supported for
  3802. multiple levels below the file (Primary or Secondary Child) to
  3803. which it is related -- a lookup will generate a second lookup
  3804. from it.
  3805.  
  3806. This File Schematic is directly supported:
  3807.  
  3808.    Primary
  3809.     └──> Secondary (Lookup from Primary)
  3810.     │  └──> Secondary (Lookup from Lookup)
  3811.     └──> Secondary (Lookup from Primary)
  3812.     └─>> Secondary (Child of Primary)
  3813.        └──> Secondary (Lookup from Secondary Child)
  3814.        │  └──> Secondary (Lookup from Lookup)
  3815.        └──> Secondary (Lookup from Secondary Child)
  3816.        └─>>Secondary (Child of Secondary Child)
  3817.           └──> Secondary (Lookup from Secondary Child)
  3818.  
  3819. This File Schematic is NOT directly supported:
  3820.  
  3821.    Primary
  3822.     └──> Secondary (Lookup from Primary)
  3823.     │  └─>>Secondary (Child of Lookup) -- NO Children of Lookups
  3824.     └─>>Secondary (Child of Primary)
  3825.     │  └──> Secondary (Lookup from Secondary Child)
  3826.     └─>>Secondary (Child of Primary) -- NO 2nd Child chains
  3827.  
  3828. This template supports multiple Group Breaks per Primary or
  3829. Secondary Child file.  The code to print the group break is
  3830. generated as a ROUTINE called from within the nested LOOP
  3831. structure after a record is read from the file for which the
  3832. group break is defined.
  3833.  
  3834. Record filters are supported on the Primary and every Secondary
  3835. Child file (see the Formula Class topic below).  Multi-Up labels
  3836. are supported -- they must be defined in the Body Detail band.
  3837.  
  3838. <Formatter Support>
  3839. Formatter Support
  3840.  
  3841. The "Report" procedure in CLARION.APP is pre-loaded with an
  3842. empty report layout.  Line counter, Page counter, and Report
  3843. Device variables are defined in local data, and the Report
  3844. Properties window uses these local variables (the line counter
  3845. is required by the template).  'GENERIC PRINTER' is the default
  3846. printer selected from the PRINTER.CTL file.
  3847.  
  3848. If you place anything in the Title Page band and intend that it
  3849. should print without first printing the Page Header (or Footer),
  3850. you must check the ALONE attribute in the Title Page's Band
  3851. Properties window.
  3852.  
  3853. The Screen Formatter contains a default screen which is included
  3854. in the generated source code only if the Show Report Progress
  3855. box is checked.  The screen contains display-only fields for the
  3856. Line Counter and Page Counter.  The values in these two fields
  3857. are displayed after each PRINT statement in the Report.
  3858.  
  3859. The Pulldown Menu Formatter is not supported by the Report
  3860. Template.
  3861.  
  3862. <Property Fields>
  3863. Property Fields
  3864.  
  3865. <  Enable ESC Key Abort: >
  3866. Enable ESC Key Abort:
  3867.      Check this box to include code to allow the user to abort the
  3868.      report at runtime by pressing the ESC key.
  3869.  
  3870. <  Show Report Progress: >
  3871. Show Report Progress:
  3872.      Check this box to display the screen defined in the Screen
  3873.      Formatter as the report is being generated.  This allows the
  3874.      user to clearly see that the report is being generated
  3875.      (especially if it is directed to a disk file).
  3876.  
  3877. <  CLEAR Record First: >
  3878. CLEAR Record First:
  3879.      Check this box to issue a CLEAR statement for the Primary
  3880.      file before the SET statement which initiates sequential
  3881.      processing.  This allows you to choose between initializing
  3882.      key fields in the Report procedure, or calling the Report
  3883.      from another procedure which allows the user to select or
  3884.      input the correct key field starting values.
  3885.  
  3886. <  Primary File Access: >
  3887. Primary File Access:
  3888.      Select the radio button which defines the type of access you
  3889.      want to the Primary file.  If you select Keyed Order, the
  3890.      Primary file's Access Key set on the Field Selection window
  3891.      is used to access the file and a Range Limit Field may be
  3892.      specified.  If you select Record Order, the Primary file is
  3893.      accessed in physical, record-number, order and any Range
  3894.      Limit Field is ignored.
  3895.  
  3896. <  Range Limit Field: >
  3897. Range Limit Field:
  3898.      The records to be printed from the Primary file can be
  3899.      limited by fixing the value of a component of the Primary
  3900.      file access key.  Only those records whose key component
  3901.      value is equal to the value in the Range Value Field will be
  3902.      printed.  You must select a key component field of the
  3903.      Primary file's access key you defined in the File Schematic.
  3904.  
  3905. <  Range Value Field: >
  3906. Range Value Field:
  3907.      Select the field which, at run-time, will contain the value
  3908.      to which you want the report's Primary file to be limited.
  3909.      The value in this field will be assigned to the key component
  3910.      field you specified in the Range Limit Field before the SET
  3911.      statement for the Primary file.
  3912.  
  3913. <  Redirect Procedure: >
  3914. Redirect Procedure:
  3915.      Enter the name of a procedure which is called before the
  3916.      report is generated to allow the user to define the report's
  3917.      destination at runtime.  The Report Template assumes that the
  3918.      report's destination is in GLO:FileSpec (a global variable
  3919.      defined in CLARION.APP) after the Redirect Procedure is
  3920.      called.  Normally, the Redirect Procedure is created from the
  3921.      Redirect Template.
  3922.  
  3923. <  View Procedure: >
  3924. View Procedure:
  3925.      Enter the name of a procedure which is called after the
  3926.      report is generated to allow the user to view the report's
  3927.      output (if the user selected the SCREEN or a FILE as the
  3928.      report's destination).  Normally, the View Procedure is
  3929.      created from the View Template.  The View Template assumes
  3930.      that the report's output filename is in GLO:FileSpec (a
  3931.      global variable defined in CLARION.APP).  If the user
  3932.      selected a printer port, the Report Template clears
  3933.      GLO:FileSpec, which disables the View Procedure.
  3934.  
  3935. <Embedded Source>
  3936. Embedded Source
  3937.  
  3938. <  Data Section >
  3939. "Data Section"
  3940.      In the data section of the procedure, after local data and
  3941.      the report structure.  This may be used to declare any data
  3942.      which you may want to use only in your embedded source code.
  3943.  
  3944. <  Setup Procedure >
  3945. "Setup Procedure"
  3946.      Immediately after the CODE statement.
  3947.  
  3948. <  After Report OPEN before Title Page >
  3949. "After Report OPEN before Title Page"
  3950.      After all files in the report are opened and the report is
  3951.      opened, but before anything is printed.
  3952.  
  3953. <  Immediately before SET(key,key) >
  3954. "Immediately before SET(key,key)"
  3955.      Immediately after the Range Value field has been assigned to
  3956.      the Range Limit field and before the SET statement which
  3957.      establishes the report's starting position in the file.  This
  3958.      allows you to correctly initialize any other fields in the
  3959.      Primary File Access Key before the SET statement.  If Range
  3960.      Limit and Range Value fields are not specified, no source
  3961.      code is generated from this Embedded Source window.
  3962.  
  3963. <  Before Primary LOOP after SET >
  3964. "Before Primary LOOP after SET"
  3965.      After the SET statement which sets up the order and starting
  3966.      point on the Primary file, but before the LOOP which
  3967.      processes the Primary file records.
  3968.  
  3969. <  Top of Primary LOOP >
  3970. "Top of Primary LOOP"
  3971.      Immediately after the LOOP statement which processes the
  3972.      Primary file and before any other statement in the LOOP. Code
  3973.      placed here will execute every time through the LOOP.
  3974.  
  3975. <  In Primary LOOP immediately after NEXT >
  3976. "In Primary LOOP immediately after NEXT"
  3977.      Code placed in this window executes immediately after each
  3978.      Primary file record is read and before any group break code
  3979.      is executed.  If you code your own record filter at this
  3980.      point instead of using a Pre:FILTER class Formula, it would
  3981.      be a good idea to check ERRORCODE() to detect the end of file
  3982.      condition (if you don't, you could create an infinite loop).
  3983.  
  3984. <  In Primary LOOP after NEXT before Lookups >
  3985. "In Primary LOOP after NEXT before Lookups"
  3986.      Code placed in this window executes after each Primary file
  3987.      record is read and any group break code is executed, but
  3988.      before any Record Filter, Lookups, or Formulas.
  3989.  
  3990. <  In Primary LOOP after Lookups >
  3991. "In Primary LOOP after Lookups"
  3992.      Code placed in this window executes after any Record Filter,
  3993.      Lookups, or Formulas from the Primary file, but before any
  3994.      related Child records are accessed.
  3995.  
  3996. <  After Primary LOOP before Grand Totals and Final Page >
  3997. "After Primary LOOP before Grand Totals and Final Page"
  3998.      Code placed in this window executes after all records from
  3999.      all files have been processed, but before the Grand Totals
  4000.      and Final Page bands are printed.
  4001.  
  4002. <  End of Procedure >
  4003. "End of Procedure"
  4004.      Code placed in this window executes after all other code in
  4005.      the procedure has executed.  At this point, the Report is
  4006.      closed.  This code begins in column one, therefore you may
  4007.      use this window to write any ROUTINEs which are called from
  4008.      any other embedded source code window.
  4009.  
  4010. <  When Screen Field is Selected : >
  4011. "When Screen Field is Selected : "
  4012.      The Report Template does not support screen processing during
  4013.      generation of the report.  Code placed here is not generated.
  4014.  
  4015. <  When Screen Field is Completed: >
  4016. "When Screen Field is Completed: "
  4017.      The Report Template does not support screen processing during
  4018.      generation of the report.  Code placed here is not generated.
  4019.  
  4020. <  Group Header Pre-Print Code for: >
  4021. "Group Header Pre-Print Code for:"
  4022.      This is an implicit embedded source code window which is
  4023.      executed immediately before the header for the group break
  4024.      referenced is printed.  There is one implicit Group Header
  4025.      Pre-Print embedded source code window for each group break
  4026.      defined in the Report Formatter.
  4027.  
  4028. <  Group Header Post-Print Code for: >
  4029. "Group Header Post-Print Code for:"
  4030.      This is an implicit embedded source code window which is
  4031.      executed immediately after the header for the group break
  4032.      referenced is printed.  There is one implicit Group Header
  4033.      Post-Print embedded source code window for each group break
  4034.      defined in the Report Formatter.
  4035.  
  4036. <  Group Footer Pre-Print Code for: >
  4037. "Group Footer Pre-Print Code for:"
  4038.      This is an implicit embedded source code window which is
  4039.      executed immediately before the footer for the group break
  4040.      referenced is printed.  There is one implicit Group Footer
  4041.      Pre-Print embedded source code window for each group break
  4042.      defined in the Report Formatter.
  4043.  
  4044. <  Group Footer Post-Print Code for: >
  4045. "Group Footer Post-Print Code for:"
  4046.      This is an implicit embedded source code window which is
  4047.      executed immediately after the footer for the group break
  4048.      referenced is printed.  There is one implicit Group Footer
  4049.      Post-Print embedded source code window for each group break
  4050.      defined in the Report Formatter.
  4051.  
  4052. <  Detail Pre-Print Code for: >
  4053. "Detail Pre-Print Code for:"
  4054.      This is an implicit embedded source code window which is
  4055.      executed immediately before the Body detail band is printed.
  4056.      There is only one implicit Detail Pre-Print embedded source
  4057.      code window in the report.
  4058.  
  4059. <  Detail Post-Print Code for: >
  4060. "Detail Post-Print Code for:"
  4061.      This is an implicit embedded source code window which is
  4062.      executed immediately after the Body detail band is printed.
  4063.      There is only one implicit Detail Post-Print embedded source
  4064.      code window in the report.
  4065.  
  4066. <Formula Classes>
  4067. Formula Classes
  4068.  
  4069. <  SETUP>
  4070. SETUP
  4071.      A Conditional or Computed Field with "SETUP" in the Formula
  4072.      Class field is calculated once at the beginning of the
  4073.      procedure, immediately after the "After Report OPEN before
  4074.      Title Page" embedded source point.
  4075.  
  4076. <  Pre:FILTER>
  4077. Pre:FILTER
  4078.      The prefix of the Primary or a Secondary Child file (not a
  4079.      Lookup file) with :FILTER appended (Pre:FILTER): This creates
  4080.      a record filter to skip over records in which the filter
  4081.      expression does not evaluate as true, just after the file's
  4082.      record is read.  Only the Formula expression (in a Computed
  4083.      Field), or the Condition expression (in a Conditional Field)
  4084.      is used to generate the filter expression. No other
  4085.      information from the Formula field is used in the filter (any
  4086.      If True or If False expressions are ignored and the Field
  4087.      Name is not used -- this may be a "dummy" field).
  4088.  
  4089. <  FileName>
  4090. FileName
  4091.      The name of the Primary or a Secondary Child file (not a
  4092.      Lookup file) in the File Schematic.  This calculates the
  4093.      formula only when a record read from the named file -- this
  4094.      comes after any Pre:FILTER expression on the file is
  4095.      evaluated and any Lookup records are read.
  4096.  
  4097. <  BreakField>
  4098. BreakField
  4099.      The name of a Group Break field (including prefix).  This
  4100.      calculates the formula just before the Group Footer is
  4101.      printed.  This is useful for formulas calculating expressions
  4102.      which include one or more Report Total fields.  The formula's
  4103.      destination variable should be placed in the group footer.
  4104.  
  4105. <  No class (blank) >
  4106. No class (blank)
  4107.      Calculates the formula every time a record is read from any
  4108.      file.
  4109.  
  4110.  
  4111. <<The Screen Template>>
  4112. <General Information>
  4113.  
  4114. The "Screen" template generates a procedure that processes a
  4115. screen created with the Screen Formatter.  The template
  4116. generates code for Range checks and enforces 'Must be in File'
  4117. from the dictionary.  The "Screen" template is intended for
  4118. displaying status windows or updating memory variables.
  4119.  
  4120. <Formatter Support>
  4121. Formatter Support
  4122.  
  4123. The "Screen" procedure in CLARION.APP is pre-loaded with an
  4124. empty screen layout.  Local data is generated before the screen
  4125. structure.  If a pulldown structure has been created by the
  4126. Pulldown Menu Formatter, it is generated after the screen
  4127. structure.  The template makes no provision for opening or
  4128. closing a pulldown menu.  Such statements must be entered as
  4129. embedded source.  Statements from the Formula Formatter are
  4130. generated at the top of the keyboard loop before the field setup
  4131. routines.  The Report Formatter is not supported.
  4132.  
  4133. <Embedded Source>
  4134. Embedded Source
  4135.  
  4136. <  Data Section >
  4137. "Data Section"
  4138.      In the data section of the procedure, after local data and
  4139.      the report structure.  This may be used to declare any data
  4140.      which you may want to use only in your embedded source code.
  4141.  
  4142. <  Setup Procedure >
  4143. "Setup Procedure"
  4144.      After the CODE statement.
  4145.  
  4146. <  Setup Screen >
  4147. "Setup Screen"
  4148.      After OPEN(Screen).
  4149.  
  4150. <  Top of Accept Loop>
  4151. "Top of Accept Loop"
  4152.       At the top of the screen field processing loop.
  4153.  
  4154. <  End of Procedure >
  4155. "End of Procedure"
  4156.      Code placed in this window executes after all other code in
  4157.      the procedure has executed.  At this point, the Report is
  4158.      closed.  This code begins in column one, therefore you may
  4159.      use this window to write any ROUTINEs which are called from
  4160.      any other embedded source code window.
  4161.  
  4162. <  When Screen Field is Selected : >
  4163. "When Screen Field is Selected : "
  4164.      In the CASE SELECTED() structure, executed when the field is
  4165.      selected for entry.
  4166.  
  4167. <  When Screen Field is Completed: >
  4168. "When Screen Field is Completed: "
  4169.      In the CASE FIELD() structure, executed when the field has
  4170.      been completed.
  4171.  
  4172. <Formula Classes>
  4173.  Formula Classes
  4174.  
  4175. No formula classes are supported by this procedure Template. All
  4176. formulas are generated within the main LOOP before the ACCEPT
  4177. statement.
  4178.  
  4179.  
  4180. <<The Select Template>>
  4181. <General Information>
  4182.  
  4183. The "Select" template generates a procedure that allows a user
  4184. to select a record from a scrolling list of records. Once the
  4185. record is selected it is loaded into memory.  You may then call
  4186. another procedure to take an action on the selected record.  For
  4187. example a print procedure may be called which prints the current
  4188. record from memory.
  4189.  
  4190. The Select template is a modified Browse template procedure to
  4191. allow a user to either select a record, or cancel the selection.
  4192. Upon selection of the Cancel button, the record buffer is
  4193. cleared.  This gives the programmer the ability to check for a
  4194. blank record.  In the print example, the programmer may select
  4195. to not print if the record is blank.
  4196.  
  4197. A set of display-only fields can be designated as "hot fields"
  4198. on screen.  Hot fields display values from the record currently
  4199. highlighted by the selector bar and change whenever the selector
  4200. bar moves.  This allows display of more information from the
  4201. highlighted record than just the one line in the List box.
  4202. These hot fields MUST appear consecutively in the Field List but
  4203. may be placed anywhere on screen.
  4204.  
  4205. An optional locator field finds a specific record in the file.
  4206. Typing any character while the LIST field is active selects the
  4207. locator field.  Completing the locator field with a TAB key or
  4208. mouse CLICK displays the closest matching record at the top of
  4209. the list box.  Another option is an "incremental locator", which
  4210. allows a half-second pause for user entry into a locator field,
  4211. and then automatically finds the closest matching record to the
  4212. contents in the locator field.  The backspace key is active
  4213. during this process.  For numeric data types, it is recommended
  4214. to use a string picture type (for display purposes).  Date
  4215. fields are not recommended for incremental locators.
  4216.  
  4217. See the Browse template help for full details on the specific
  4218. operation of the scrolling listbox and the pushbuttons.
  4219.  
  4220. <Formatter Support>
  4221. Formatter Support
  4222.  
  4223. The "Select" template in CLARION.APP is pre-loaded with a screen
  4224. layout containing a list box and pushbuttons named "Insert",
  4225. "Change", "Delete", "Select" and "Cancel".  The field equate
  4226. label of the list box MUST be "?List" and the "Immediate"
  4227. attribute MUST be on turned on.  The horizontal scroll bar can
  4228. be turned off if the required information fits in the list box.
  4229. The vertical scroll bar is ignored by the template.  The list
  4230. box may not have an edit procedure.  All other properties of the
  4231. list box can be changed.
  4232.  
  4233. Fields from related files may be scrolled in the listbox as
  4234. "lookups" will be done automatically from the Primary file in
  4235. the file schematic.
  4236.  
  4237. The "Insert", "Change", and "Delete" pushbuttons call an update
  4238. procedure to process the selected record (update procedures are
  4239. normally created with a "Form" or "MultiPage" template).  The
  4240. name of the procedure must be entered as the "Update Procedure"
  4241. property.  If there is no update procedure, these pushbuttons
  4242. can be deleted.  If all three pushbuttons are deleted and you
  4243. have named an update procedure, the INSERT, ENTER and DELETE
  4244. keys will Insert, Change, and Delete records while the list box
  4245. is selected.  However, if only one or two of these buttons have
  4246. been removed, the function of that button (Insert, Change, or
  4247. Delete) will be removed from the list box as well and no update
  4248. procedure will be called for that function.
  4249.  
  4250. The "Select" and "Cancel" pushbuttons should not be deleted.
  4251.  
  4252. Local data is generated before the screen structure. If a
  4253. pulldown structure has been created by the Pulldown Menu
  4254. Formatter, it is generated after the screen structure.  The
  4255. template makes no provision for opening or closing a pulldown
  4256. menu.  Such statements must be entered as embedded source.
  4257.  
  4258. The Report Formatter is not supported.
  4259.  
  4260. <Property Fields>
  4261. Property Fields
  4262.  
  4263. <  Range Limit Field: >
  4264. Range Limit Field:
  4265.      The range of records to be displayed can be limited by fixing
  4266.      the value of a component of the primary file access key.  For
  4267.      example, line items on an invoice can be limited to a single
  4268.      invoice.  The key for the item file might contain ITM:Invoice
  4269.      and ITM:Line containing the invoice number and line number of
  4270.      the item.
  4271.  
  4272.      ITM:Invoice would be the Range Limit Field, displaying only
  4273.      those records for a fixed invoice number.
  4274.  
  4275. <  Range Value Field: >
  4276. Range Value Field:
  4277.      The Range Value Field is the field which holds the value to
  4278.      be used as the limiting key component value.  The key
  4279.      component will be assigned this value.
  4280.  
  4281.      In this example, the current Invoice record might contain the
  4282.      number of the invoice that is being displayed.  INV:Number
  4283.      would be the Range Value Field, supplying the value for the
  4284.      Range Limit Field.  The Range Value Field must not be the
  4285.      same field as the Range Limit Field.
  4286.  
  4287. <  Record Filter:>
  4288. Record Filter:
  4289.      There are 2 ways to enter a record filter:
  4290.  
  4291.      The formula generator can be used with a formula class of
  4292.      'FILTER' to validate the expression as entered.
  4293.  
  4294.      Enter a free-form record filter expression in this field.  No
  4295.      validation is done on the code you enter -- an invalid
  4296.      expression will generate compiler errors.  If you are not
  4297.      familiar with the Clarion language statements or expressions,
  4298.      do not use this entry -- use a Formula field with the FILTER
  4299.      Formula Class instead.
  4300.  
  4301. <  Locator Field: >
  4302. Locator Field:
  4303.      A locator field is a screen entry field that updates a
  4304.      component of the primary file access key.  When a locator
  4305.      field is entered, the closest matching record is displayed in
  4306.      the list box.
  4307.  
  4308.      For example, scrolling a vendor file in vendor name sequence
  4309.      uses a key that contains the vendor name field (e.g.
  4310.      VND:Name).  To create a vendor name locator field, place a
  4311.      VND:Name entry field on the screen below the list box and
  4312.      enter VND:Name for the Locator Field.
  4313.  
  4314.      Once the user types a character on the keyboard, the locator
  4315.      field is selected and allows entry for the match.  Pressing
  4316.      the Tab key positions the point bar to the closest match.
  4317.      Another option is "Incremental Locator".  This template
  4318.      option allows one-half second for the user to type a new
  4319.      letter into the locator field.  At each pause longer than
  4320.      one-half second, the field contents are used to locate the
  4321.      closest match (the Tab key does not need to be pressed).  The
  4322.      backspace key is active during this process.
  4323.  
  4324. <  Incremental Locator  >
  4325. [√] Incremental Locator
  4326.      Check this box to indicate that the Locator Field will act as
  4327.      an incremental locator.
  4328.  
  4329. <  Update Procedure: >
  4330. Update Procedure:
  4331.      Enter the name of the update procedure to be used to insert,
  4332.      change, or delete records.  If no update procedure is
  4333.      entered, the "Insert", "Change", and "Delete" pushbuttons
  4334.      should be removed from the screen layout.
  4335.  
  4336. <  First Hot Field: >
  4337. First Hot Field:
  4338.      Hot fields are a set of display-only fields that display the
  4339.      contents of the record under the selector bar.  They must
  4340.      appear consecutively in the Field List.
  4341.  
  4342.      Enter the name of the first hot field.
  4343.  
  4344. <  Last Hot Field: >
  4345. Last Hot Field:
  4346.      Enter the name of the last hot field.
  4347.  
  4348. <  Enable Hot Records >
  4349. [√] Enable Hot Records
  4350.      By enabling hot records the programmer has complete control
  4351.      at every list box movement from the Browse manager. With this
  4352.      option enabled, every movement of the point bar gets the
  4353.      record under the point bar into memory, looks up any many to
  4354.      one secondary files, computes any general formulas and
  4355.      executes any embedded source code which was entered in the
  4356.      'Process Selected Record' code window.
  4357.  
  4358. <  Enable Total Embeds >
  4359. [√] Enable Total Embeds
  4360.      Check this box to generate total field code, without the need
  4361.      for dummy formula fields.  Otherwise, you must define a total
  4362.      field with a formula class of SUM or AVG.
  4363.  
  4364. <Embedded Source>
  4365. Embedded Source
  4366.  
  4367. <  Data Section >
  4368. "Data Section"
  4369.      In the data section of the procedure after local data, the
  4370.      screen and pulldown structures.  This may be used to declare
  4371.      any data which you may want to use only in your embedded
  4372.      source code.
  4373.  
  4374. <  Setup Procedure >
  4375. "Setup Procedure"
  4376.      After the CODE statement.
  4377.  
  4378. <  Setup Screen >
  4379. "Setup Screen"
  4380.      After OPEN(Screen) statement.
  4381.  
  4382. <  Setup Pulldown>
  4383. "Setup Pulldown"
  4384.      After OPEN(PullDown) statement.
  4385.  
  4386. <  Set to First Record Before Total Loop>
  4387. "Set to First Record Before Total Loop"
  4388.      After the SET(key,key) for Range limits before beginning the
  4389.      total calculation LOOP.
  4390.  
  4391. <  Inside Total Loop, Immediately after NEXT>
  4392. "Inside Total Loop, Immediately after NEXT"
  4393.      Immediately after each record is read in the total
  4394.      calculation LOOP.
  4395.  
  4396. <  Inside Total Loop after Filter>
  4397. "Inside Total Loop after Filter"
  4398.      After each record is read and filter conditions are evaluated
  4399.      in the total calculation LOOP.
  4400.  
  4401. <  After Total Field Loop>
  4402. "After Total Field Loop"
  4403.      After all totals have been calculated.
  4404.  
  4405. <  LIST Class Formula>
  4406. "LIST Class Formula"
  4407.      After generation of LIST class formulas.  This embedded code
  4408.      window may be used instead of LIST class formulas.  This will
  4409.      allow setting up any fields which are displayed within the
  4410.      scrolling listbox.
  4411.  
  4412. <  End of General Formulas>
  4413. "End of General Formulas"
  4414.      When processing a screen field, the formulas which do not
  4415.      have a class of 'FILTER' of 'LIST' will be generated.  This
  4416.      embedded source window allows the entry of computations for
  4417.      screen display fields without the use of the formula
  4418.      formatter.
  4419.  
  4420. <  Case of No Records Found>
  4421. "Case of No Records Found"
  4422.      When no records are found to display.
  4423.  
  4424. <  After Filter and Range Check>
  4425. "After Filter and Range Check"
  4426.      After any record filter or Range limits are evaluated.
  4427.  
  4428. <  Set to First Record>
  4429. "Set to First Record"
  4430.      When using Range Limits, a SET() command is issued to locate
  4431.      the first record. This embedded source code window appears
  4432.      just after the generated SET() command and allows a
  4433.      programmer override of the SET() command.
  4434.  
  4435. <  Set to Last Record>
  4436. "Set to Last Record"
  4437.      When using Range Limits, a SET() command is used to locate
  4438.      the closest match to the last record.  This embedded source
  4439.      code window appears just after the generated SET() command
  4440.      and allows a programmer override of the SET() command.
  4441.  
  4442. <  Process Selected Record>
  4443. "Process Selected Record"
  4444.      When Enable Hot Records has been checked, code within this
  4445.      embedded source window will be executed upon movement of the
  4446.      point bar.  The record under the point bar will be retrieved
  4447.      into memory, any many to one secondary file records will be
  4448.      retrieved and any general formulas will be computed just
  4449.      prior to the insertion of this embedded source code.
  4450.  
  4451. <  End of Procedure>
  4452. "End of Procedure"
  4453.      Code placed in this window executes after all other code in
  4454.      the procedure has executed.  This code begins in column one,
  4455.      therefore you may use this window to write any ROUTINEs which
  4456.      are called from any other embedded source code window.
  4457.  
  4458. <  Prior to Update Procedure>
  4459. "Prior to Update Procedure"
  4460.      Immediately before the Update Procedure is called.
  4461.  
  4462. <  After Update Procedure>
  4463. "After Update Procedure"
  4464.      Immediately after return from the Update Procedure.
  4465.  
  4466. <  When Screen Field is Selected : >
  4467. "When Screen Field is Selected : "
  4468.      In the CASE SELECTED() structure, executed when the field is
  4469.      selected for entry.
  4470.  
  4471. <  When Screen Field is Completed: >
  4472. "When Screen Field is Completed: "
  4473.      In the CASE FIELD() structure, executed when the field has
  4474.      been completed.
  4475.  
  4476. <Formula Classes>
  4477. Formula Classes
  4478.  
  4479. <  FILTER >
  4480. FILTER
  4481.      A Conditional Field with "FILTER" in the Formula Class field
  4482.      is used to select which records are displayed.  If the
  4483.      Condition expression evaluates to zero (false) for a given
  4484.      record, it is not displayed.
  4485.  
  4486. <  LIST >
  4487. LIST
  4488.      A Conditional or Computed Field with "LIST" in the Formula
  4489.      Class field is used for those values which will be displayed
  4490.      in the list box and are only evaluated when the list box item
  4491.      is created.
  4492.  
  4493. <  SUM >
  4494. SUM
  4495.      A Computed Field with "SUM" in the Formula Class field
  4496.      calculates the total of the values contained in the field
  4497.      named in the Expression.  A Conditional Field with "SUM" in
  4498.      the Formula Class field conditionally calculates the total of
  4499.      the values contained in the fields named in the True and
  4500.      False Expressions.
  4501.  
  4502. <  AVG >
  4503. AVG
  4504.      A Computed Field with "AVG" in the Formula Class field
  4505.      calculates the arithmetic mean of the field named in the
  4506.      Expression.  A Conditional Field with "AVG" in the Formula
  4507.      Class field conditionally calculates the arithmetic mean of
  4508.      the fields named in the True and False Expressions.  In both
  4509.      cases, the total value is calculated, then divided by the
  4510.      number of records read to achieve that total.
  4511.  
  4512. <  No class (blank) >
  4513. No class (blank)
  4514.      Calculates the formula every time any field on the screen is
  4515.      completed.  The calculation code is generated before the
  4516.      field setup routines at the top of the processing LOOP.
  4517.  
  4518.  
  4519. <<The Source Template>>
  4520. <General Information>
  4521.  
  4522. The "Source" template generates a procedure comprised only of
  4523. embedded source code.  All executable statements in the
  4524. procedure, must be entered at the embedded source point labeled
  4525. "All Executable Source Code". The source entered must contain
  4526. (at least) a RETURN statement. The "Source" template is intended
  4527. for procedures that cannot be generated by any other template.
  4528.  
  4529. <Formatters Supported>
  4530. Formatters Supported
  4531.  
  4532. The "Source" template does not support the Application
  4533. Generator's Screen, Report, Pulldown Menu, or Formula
  4534. formatters.  However, the Text Editor's Screen, Report, and
  4535. Pulldown Menu Formatters can be invoked while entering embedded
  4536. source in the Data Section.
  4537.  
  4538. <Property Fields>
  4539. Property Fields
  4540.  
  4541. <  Prototype:>
  4542. Prototype:
  4543.      Enter the procedure's prototype (all except the procedure's
  4544.      name) to be placed in the program's MAP structure.  For
  4545.      example, if your procedure is a FUNCTION called MyProc and it
  4546.      will receive two parameters -- a STRING and a BYTE passed by
  4547.      address -- and return a STRING, you would enter :
  4548.  
  4549.          (STRING,*BYTE),STRING
  4550.  
  4551.      See FUNCTION and PROCEDURE Prototypes in the Language
  4552.      Reference for a discussion of valid prototypes.
  4553.  
  4554. <  Parameter List:>
  4555. Parameter List:
  4556.      Enter the complete parameter list (including parentheses) to
  4557.      be placed on the procedure's PROCEDURE or FUNCTION statement.
  4558.      This labels the passed parameters for reference within the
  4559.      procedure.  For the above example, you could enter:
  4560.  
  4561.          (Fred,Joe)
  4562.  
  4563.      The generated source code for the procedure would look like:
  4564.  
  4565.          MyProc          FUNCTION(Fred,Joe)
  4566.  
  4567.      In your executable code, you would reference the STRING
  4568.      parameter as "Fred" and the BYTE as "Joe."
  4569.  
  4570. <Embedded Source>
  4571. Embedded Source
  4572.  
  4573. <  Data Section >
  4574. "Data Section"
  4575.      In the data section of the procedure, after local data. This
  4576.      may be used to declare any data which you may want to use in
  4577.      your embedded source code.
  4578.  
  4579. <  All Executable Source Code >
  4580. "All Executable Source Code"
  4581.      All executable statements in the procedure must go in here.
  4582.  
  4583. <Formula Classes>
  4584. Formula Classes
  4585.  
  4586. No formula classes are supported by this procedure Template.
  4587. Formula fields are not supported.
  4588.  
  4589.  
  4590. <<The Table21 Template>>
  4591. <General Information>
  4592.  
  4593. The "Table21" template generates a procedure that scrolls data
  4594. files on the screen like a spreadsheet.  Unlike the List or
  4595. Browse templates, the Table uses a REPEAT structure instead of
  4596. a list box.  Table is similar to the Browse template, but allows
  4597. you the flexibility of coloring individual screen fields and
  4598. displaying multi-line individual records.
  4599.  
  4600. The Table21 Template is provided for compatibility with the
  4601. Clarion Professional Developer version 2.1-style TABLE
  4602. procedures.  When you import a TABLE procedure from a 2.1 .APP
  4603. file, this template is used but the BUTTON fields in the default
  4604. screen design are not generated (maintaining 2.1 compatibility).
  4605. Keystrokes for insert, change, and delete will be retained.
  4606. BUTTON fields are supported, but are not created in the
  4607. conversion process.
  4608.  
  4609. A Table21 procedure receives an omittable BYTE parameter that
  4610. defines the procedure's use at runtime:  "Standard mode" or
  4611. "Select mode."
  4612.  
  4613. "Standard mode" means no parameter was passed.  Therefore, the
  4614. procedure acts the same as all other Browse-type procedures:
  4615. when the user presses Enter on a highlighted record, the Update
  4616. Procedure is called; the Delete and Insert buttons are active;
  4617. and, if a "Select" button exists, it is dimmed.  This duplicates
  4618. the action of a version 2.1 TABLE that is not called as a
  4619. "lookup."
  4620.  
  4621. "Select mode" means a value of four (SelectRecord = 4) was
  4622. passed as the parameter and allows the Select button to be
  4623. active.  When an item is selected, its record is read from disk
  4624. into the record buffer and the Table21 procedure returns to the
  4625. calling procedure.  This duplicates the action of a version 2.1
  4626. "lookup" TABLE.  The hot key for the Change and Select buttons
  4627. should be EnterKey.
  4628.  
  4629. <Formatter Support>
  4630. Formatter Support
  4631.  
  4632. The "Table21" procedure in CLARION.APP is pre-loaded with a
  4633. screen layout with a REPEAT structure containing a POINT field
  4634. and pushbuttons named "Insert," "Change," "Delete," and "Exit."
  4635. These buttons are not created when importing a 2.1 TABLE from a
  4636. 2.1 .APP file.
  4637.  
  4638. If a pulldown structure has been created in the Pulldown Menu
  4639. Formatter, it is generated after the screen structure.  The
  4640. template makes no provision for opening or closing a pulldown
  4641. menu.  Such statements must be entered as embedded source.
  4642.  
  4643. The Report Formatter is not supported.
  4644.  
  4645. <Property Fields>
  4646. Property Fields
  4647.  
  4648. <  Range Limit Field:>
  4649. Range Limit Field:
  4650.      The range of records to be displayed can be limited by
  4651.      fixing the value of a component of the primary file access
  4652.      key.  For example, line items on an invoice can be limited
  4653.      to a single invoice.  The key for the item file might
  4654.      contain ITM:Invoice and ITM:Line containing the invoice
  4655.      number and line number of the item.
  4656.  
  4657.      ITM:Invoice would be the Range Limit Field, displaying only
  4658.      those records for a fixed invoice number.
  4659.  
  4660. <  Range Value Field:>
  4661. Range Value Field:
  4662.      The Range Value Field is the field which holds the value to
  4663.      be used as the limiting key component value.  The key
  4664.      component will be assigned this value.
  4665.  
  4666.      In this example, the current Invoice record might contain
  4667.      the number of the invoice that is being displayed.
  4668.      INV:Number would be the Range Value Field, supplying the
  4669.      value for the Range Limit Field. The Range Value Field
  4670.      must not be the same field as the Range Limit Field.
  4671.  
  4672. <  Record Filter:>
  4673. Record Filter:
  4674.      There are 2 ways to enter a record filter:
  4675.  
  4676.      The formula generator can be used with a formula class of
  4677.      'FILTER' to validate the expression as entered.
  4678.  
  4679.      Enter a free-form record filter expression in this field.  No
  4680.      validation is done on the code you enter -- an invalid
  4681.      expression will generate compiler errors.  If you are not
  4682.      familiar with the Clarion language statements or expressions,
  4683.      do not use this entry -- use a Formula field with the FILTER
  4684.      Formula Class instead.
  4685.  
  4686. <  Locator Field: >
  4687. Locator Field:
  4688.      A locator field is a screen entry field that updates a
  4689.      component of the primary file access key.  When a locator
  4690.      field is entered, the closest matching record is displayed in
  4691.      the list box.
  4692.  
  4693.      For example, scrolling a vendor file in vendor name sequence
  4694.      uses a key that contains the vendor name field (e.g.
  4695.      VND:Name).  To create a vendor name locator field, place a
  4696.      VND:Name entry field on the screen below the list box and
  4697.      enter VND:Name for the Locator Field.
  4698.  
  4699.      Once the user types a character on the keyboard, the locator
  4700.      field is selected and allows entry for the match.  Pressing
  4701.      the Tab key positions the point bar to the closest match.
  4702.  
  4703.      Another option is "Incremental Locator".  This template
  4704.      option allows one-half second for the user to type a new
  4705.      letter into the locator field.  At each pause longer than
  4706.      one-half second, the field contents are used to locate the
  4707.      closest match (the Tab key does not need to be pressed).  The
  4708.      backspace key is active during this process.
  4709.  
  4710. <  Incremental Locator >
  4711. [√] Incremental Locator
  4712.      Check this box to indicate that the Locator Field will act as
  4713.      an incremental locator.
  4714.  
  4715. <  Update Procedure:>
  4716. Update Procedure:
  4717.      Enter the name of the update procedure to be used to insert,
  4718.      change, or delete records.  If no update procedure is
  4719.      entered, the "Insert", "Change", and "Delete" pushbuttons
  4720.      should be removed from the screen layout.
  4721.  
  4722.      Special considerations may exist when using ASCII, DOS, and
  4723.      BASIC file drivers.  In some cases a PUT or DELETE is not
  4724.      allowed.  See the file driver's documentation for file driver
  4725.      specifics.
  4726.  
  4727. <  First Hot Field:>
  4728. First Hot Field:
  4729.      Hot fields are a set of display-only fields that display the
  4730.      contents of the record under the selector bar.  They must
  4731.      appear consecutively in the Field List.
  4732.  
  4733.      Enter the name of the first hot field.
  4734.  
  4735. <  Last Hot Field:>
  4736. Last Hot Field:
  4737.      Enter the name of the last hot field.
  4738.  
  4739. <Embedded Source>
  4740. Embedded Source
  4741.  
  4742. <  Data Section>
  4743. "Data Section"
  4744.      In the data section of the procedure after local data, the
  4745.      screen and pulldown structures.  This may be used to declare
  4746.      any data which you may want to use only in your embedded
  4747.      source code.
  4748.  
  4749. <  Setup Procedure>
  4750. "Setup Procedure"
  4751.      After the CODE statement.
  4752.  
  4753. <  Setup Screen>
  4754. "Setup Screen"
  4755.      After OPEN(Screen) statement.
  4756.  
  4757. <  LIST Class Formula>
  4758. "LIST Class Formula"
  4759.      After generation of LIST class formulas. This embedded
  4760.      code window may be used instead of LIST class formulas.
  4761.      This will allow setting up any fields which are displayed
  4762.      within the scrolling table.
  4763.  
  4764. <  End of General Formulas>
  4765. "End of General Formulas"
  4766.      When processing a screen field, the formulas which do not
  4767.      have a class of 'FILTER' of 'LIST' will be generated.  This
  4768.      embedded source window allows the entry of computations for
  4769.      screen display fields without the use of the formula
  4770.      formatter.
  4771.  
  4772. <  End of Procedure>
  4773. "End of Procedure"
  4774.      Code placed in this window executes after all other code in
  4775.      the procedure has executed.  This code begins in column one,
  4776.      therefore you may use this window to write any ROUTINEs which
  4777.      are called from any other embedded source code window.
  4778.  
  4779. <  When Screen Field is Selected : >
  4780. "When Screen Field is Selected : "
  4781.      In the CASE SELECTED() structure, executed when the field is
  4782.      selected for entry.
  4783.  
  4784. <  When Screen Field is Completed: >
  4785. "When Screen Field is Completed: "
  4786.      In the CASE FIELD() structure, executed when the field has
  4787.      been completed.
  4788.  
  4789. <Formula Classes>
  4790. Formula Classes
  4791.  
  4792. <  FILTER >
  4793. FILTER
  4794.      A Conditional Field with "FILTER" in the Formula Class field
  4795.      is used to select which records are displayed.  If the
  4796.      Condition expression evaluates to zero (false) for a given
  4797.      record, it is not displayed.
  4798.  
  4799.      Enter the expression for the Conditional field and leave the
  4800.      True and False conditions blank.  Only the Expression will be
  4801.      used for the filter. A filter expression may be entered in
  4802.      the Record Filter property field instead of using the formula
  4803.      formatter.
  4804.  
  4805. <  LIST >
  4806. LIST
  4807.      A Conditional or Computed Field with "LIST" in the Formula
  4808.      Class field is used for those values which will be
  4809.      displayed in the scrolling table and are only evaluated
  4810.      when the Table is built.
  4811.  
  4812. <  SUM >
  4813. SUM
  4814.      A Computed Field with "SUM" in the Formula Class field
  4815.      calculates the total of the values contained in the field
  4816.      named in the Expression.  A Conditional Field with "SUM" in
  4817.      the Formula Class field conditionally calculates the total of
  4818.      the values contained in the fields named in the True and
  4819.      False Expressions.
  4820.  
  4821. <  AVG >
  4822. AVG
  4823.      A Computed Field with "AVG" in the Formula Class field
  4824.      calculates the arithmetic mean of the field named in the
  4825.      Expression.  A Conditional Field with "AVG" in the Formula
  4826.      Class field conditionally calculates the arithmetic mean of
  4827.      the fields named in the True and False Expressions.  In both
  4828.      cases, the total value is calculated, then divided by the
  4829.      number of records read to achieve that total.
  4830.  
  4831. <  No class (blank) >
  4832. No class (blank)
  4833.      Calculates the formula every time any field on the screen is
  4834.      completed.  The calculation code is generated before the
  4835.      field edit routines at the top of the field processing code.
  4836.  
  4837.  
  4838. <<The ToDo Template>>
  4839. <General Information>
  4840.  
  4841. The "ToDo" template should not be selected for code generation.
  4842. Procedures, when first referenced, are automatically created as
  4843. ToDo until the template for code generation is selected.
  4844.  
  4845. No operation "Stub code" is generated for procedures which
  4846. remain as "ToDo" at source generation time.
  4847.  
  4848.  
  4849. <<The Update Template>>
  4850. <General Information>
  4851.  
  4852. This Template is not yet implemented.
  4853.  
  4854.  
  4855. <<The Validate Template>>
  4856. <General Information>
  4857.  
  4858. The "Validate" template generates a procedure that will be used
  4859. to perform entry field validation.  The procedure MUST be called
  4860. as the "When Field is Completed" Procedure on the entry field to
  4861. validate.  When the entry field has been completed, the Validate
  4862. procedure will be called to check for the existence of the value
  4863. in the current field against the specified key.  If no match is
  4864. found, a screen with a list box is presented to allow the user
  4865. to select a valid entry.
  4866.  
  4867. Selected fields from the data file are displayed as columns in
  4868. a list box.  Columns that do not fit in the list box are
  4869. displayed using the horizontal scroll bar or the left and right
  4870. arrow keys.
  4871.  
  4872. A selector bar is always positioned over a single row.  The up
  4873. and down arrow keys move the selector bar.  Moving the selector
  4874. bar up off the top row or down off the bottom row scrolls a new
  4875. record into the list box.  The PGUP and PGDN keys scroll the
  4876. prior and next pages of records into the list box.  CTRL-PGUP
  4877. displays the first page of records and CTRL-PGDN displays the
  4878. last page of records.  Pressing the right mouse button in the
  4879. top half of the list box scrolls up and in the bottom half
  4880. scrolls down.  The ENTER key and the mouse DOUBLE-CLICK selects
  4881. the highlighted record and completes the procedure.
  4882.  
  4883. The Validate Template uses PRESS to place the selected value
  4884. into the entry field it was called to validate.  Therefore, if
  4885. numeric data is being validated, the typing mode of that field
  4886. should be INSERT.  This allows PRESS to put the correct value
  4887. into the field.
  4888.  
  4889. The "Select", "Insert" and "Change" pushbuttons, or any other
  4890. field that processes the record under the selector bar MUST be
  4891. placed after the LIST field in the Field List.
  4892.  
  4893. An optional locator field finds a specific record in the file.
  4894. Typing any letter while the LIST field is active selects the
  4895. locator field.  Completing the locator field with a Tab key or
  4896. mouse click displays the closest matching record at the top of
  4897. the list box.
  4898.  
  4899. A set of display-only fields can be designated as "hot fields"
  4900. on screen.  Hot fields display values from the record currently
  4901. highlighted by the selector bar and change whenever the selector
  4902. bar moves.  This allows display of more information from the
  4903. highlighted record than just the one line in the List box.
  4904. These hot fields MUST appear consecutively in the Field List but
  4905. may be placed anywhere on screen.
  4906.  
  4907. When you define a SUM or AVG formula class, total field code
  4908. generation is automatically enabled.
  4909.  
  4910. <Formatter Support>
  4911. Formatter Support
  4912.  
  4913. The "Validate" procedure in CLARION.APP is pre-loaded with a
  4914. screen layout containing a list box and pushbuttons named
  4915. "Select", "Insert", and "Change".  The field equate label of the
  4916. list box MUST be "?List" and the "Immediate" attribute MUST be
  4917. on turned on.  The horizontal scroll bar can be turned off if
  4918. the required information fits in the list box.  All other
  4919. properties of the list box can be changed.
  4920.  
  4921. Fields from related files may be scrolled in the list box as
  4922. "lookups" will be done automatically from the Primary file in
  4923. the file schematic to Secondary files with a "Many to 1"
  4924. relationship.  "1 to Many" relationships are not supported by
  4925. this procedure Template.
  4926.  
  4927. The "Insert" and "Change" pushbuttons call an update procedure
  4928. to process the selected record (normally created with a "Form"
  4929. template).  The name of the procedure must be entered as the
  4930. "Update Procedure". If there is no update procedure entered,
  4931. these pushbuttons may be deleted.  The ENTER key and mouse
  4932. DOUBLE-CLICK while on the listbox will select the record under
  4933. the selector bar and enter the value in the entry field.
  4934.  
  4935. Local data is generated before the screen structure.  If a
  4936. pulldown structure has been created by the Pulldown Menu
  4937. Formatter, it is generated after the screen structure.  The
  4938. template makes no provision for opening or closing a pulldown
  4939. menu (you must write embedded source for this).
  4940.  
  4941. <Property Fields>
  4942. Property Fields
  4943.  
  4944. <  Range Limit Field: >
  4945. Range Limit Field:
  4946.      The range of records to be displayed can be limited by fixing
  4947.      the value of a component of the primary file access key.  For
  4948.      example, line items on an invoice can be limited to a single
  4949.      invoice.  The key for the item file might contain ITM:Invoice
  4950.      and ITM:Line containing the invoice number and line number of
  4951.      the item.
  4952.  
  4953.      ITM:Invoice would be the Range Limit Field, displaying only
  4954.      those records for a fixed invoice number.
  4955.  
  4956. <  Range Value Field: >
  4957. Range Value Field:
  4958.      The Range Value Field is the field which holds the value to
  4959.      be used as the limiting key component value.  The key
  4960.      component will be assigned this value.
  4961.  
  4962.      In this example, the current Invoice record might contain the
  4963.      number of the invoice that is being displayed.  INV:Number
  4964.      would be the Range Value Field, supplying the value for the
  4965.      Range Limit Field.  The Range Value Field must not be the
  4966.      same field as the Range Limit Field.
  4967.  
  4968. <  Record Filter:>
  4969. Record Filter:
  4970.      There are 2 ways to enter a record filter:
  4971.  
  4972.      The formula generator can be used with a formula class of
  4973.      'FILTER' to validate the expression as entered.
  4974.  
  4975.      Enter a free-form record filter expression in this field.  No
  4976.      validation is done on the code you enter -- an invalid
  4977.      expression will generate compiler errors.  If you are not
  4978.      familiar with the Clarion language statements or expressions,
  4979.      do not use this entry -- use a Formula field with the FILTER
  4980.      Formula Class instead.
  4981.  
  4982. <  Lookup Field: >
  4983. Lookup Field:
  4984.      Enter the name of the field to be used to validate against
  4985.      your entry field.  This field should be the only field in a
  4986.      single-component unique key.
  4987.  
  4988. <  Input Field Picture: >
  4989. Input Field Picture:
  4990.      Some fields do not appear on screen in the same format as the
  4991.      data exists in the file (and in the key).  These fields must
  4992.      have an Input Field Picture to DEFORMAT the data for
  4993.      validation and to FORMAT the selected data for on-screen
  4994.      display.
  4995.  
  4996.      Enter the display picture to DEFORMAT the data for
  4997.      validation.  This picture is also used to FORMAT the data to
  4998.      PRESS it into the keyboard buffer and fill the entry field
  4999.      when a record is selected from this procedure's list.
  5000.  
  5001.      Examples of fields which require an Input Field Picture:
  5002.  
  5003.      Any STRING, CSTRING, or PSTRING with an implied decimal
  5004.      storage picture (for example, @N6v2).
  5005.  
  5006.      Any numeric data field (LONG, DATE, USHORT, etc.) with a date
  5007.      (@D1, @D2, etc.) or time (@T1, @T2, etc.) display picture.
  5008.  
  5009.      Any numeric data field (REAL, BFLOAT, etc.) with a display
  5010.      picture which includes a decimal portion (for example,
  5011.      @N6.2).
  5012.  
  5013. <  Locator Field: >
  5014. Locator Field:
  5015.      A locator field is a screen entry field that updates a
  5016.      component of the primary file access key.  When a locator
  5017.      field is entered, the closest matching record is displayed in
  5018.      the list box.
  5019.  
  5020.      For example, scrolling a vendor file in vendor name sequence
  5021.      uses a key that contains the vendor name field (e.g.
  5022.      VND:Name).  To create a vendor name locator field, place a
  5023.      VND:Name entry field on the screen below the list box and
  5024.      enter VND:Name for the Locator Field.
  5025.  
  5026.      Once the user types a character on the keyboard, the locator
  5027.      field is selected and allows entry for the match.  Pressing
  5028.      the Tab key positions the point bar to the closest match.
  5029.  
  5030. <  Display Key: >
  5031. Display Key:
  5032.      If using one key for entry field validation and another key
  5033.      as the display key, enter the name of the display key here.
  5034.      Otherwise, leave this field blank.
  5035.  
  5036. <  Update Procedure: >
  5037. Update Procedure:
  5038.      Enter the name of the update procedure to be used to insert,
  5039.      change, or delete records.  If no update procedure is
  5040.      entered, the "Insert" and "Change" pushbuttons should be
  5041.      removed from the screen layout.
  5042.  
  5043. <  First Hot Field: >
  5044. First Hot Field:
  5045.      Hot fields are a set of display-only fields that display the
  5046.      contents of the record under the selector bar.  They must
  5047.      appear consecutively in the Field List.
  5048.  
  5049.      Enter the name of the first hot field.
  5050.  
  5051. <  Last Hot Field: >
  5052. Last Hot Field:
  5053.      Enter the name of the last hot field.
  5054.  
  5055. <  Enable Hot Records >
  5056. [√] Enable Hot Records
  5057.      By enabling hot records the programmer has complete control
  5058.      at every list box movement from the Browse manager. With this
  5059.      option enabled, every movement of the point bar gets the
  5060.      record under the point bar into memory, looks up any many to
  5061.      one secondary files, computes any general formulas and
  5062.      executes any embedded source code which was entered in the
  5063.      'Process Selected Record' code window.
  5064.  
  5065. <  Lookup Hot Key: >
  5066. Lookup Hot Key:
  5067.      When the Validate procedure is being called by a hot key,
  5068.      enter the hot key here.  When a hot key is entered and the
  5069.      hot key is detected upon entry of the Validate procedure, the
  5070.      screen will be opened.  No validation check will be done
  5071.      prior to the open of the screen.
  5072.  
  5073. <Embedded Source>
  5074. Embedded Source
  5075.  
  5076. <  Data Section>
  5077. "Data Section"
  5078.      In the data section of the procedure after local data, the
  5079.      screen and pulldown structures.  This may be used to declare
  5080.      any data which you may want to use only in your embedded
  5081.      source code.
  5082.  
  5083. <  Setup Procedure>
  5084. "Setup Procedure"
  5085.      After the CODE statement.
  5086.  
  5087. <  Before Validate Lookup>
  5088. "Before Validate Lookup"
  5089.      After opening the primary file, you may enter source code in
  5090.      this window to pre-fill any fields which will be used by the
  5091.      lookup other than the Lookup Field.
  5092.  
  5093. <  Setup Screen>
  5094. "Setup Screen"
  5095.      After OPEN(Screen).
  5096.  
  5097. <  Setup Pulldown>
  5098. "Setup Pulldown"
  5099.      After OPEN(PullDown) statement.
  5100.  
  5101. <  Set to First Record Before Total Loop>
  5102. "Set to First Record Before Total Loop"
  5103.      After the SET(key,key) for Range limits before beginning the
  5104.      total calculation LOOP.
  5105.  
  5106. <  Inside Total Loop, Immediately after NEXT>
  5107. "Inside Total Loop, Immediately after NEXT"
  5108.      Immediately after each record is read in the total
  5109.      calculation LOOP.
  5110.  
  5111. <  Inside Total Loop after Filter>
  5112. "Inside Total Loop after Filter"
  5113.      After each record is read and filter conditions are evaluated
  5114.      in the total calculation LOOP.
  5115.  
  5116. <  After Total Field Loop>
  5117. "After Total Field Loop"
  5118.      After all totals have been calculated.
  5119.  
  5120. <  LIST Class Formula>
  5121. "LIST Class Formula"
  5122.      After generation of LIST class formulas.  This embedded code
  5123.      window may be used instead of LIST class formulas.  This will
  5124.      allow setting up any fields which are displayed within the
  5125.      scrolling listbox.
  5126.  
  5127. <  End of General Formulas>
  5128. "End of General Formulas"
  5129.      When processing a screen field, the formulas which do not
  5130.      have a class of 'FILTER' of 'LIST' will be generated.  This
  5131.      embedded source window allows the entry of computations for
  5132.      screen display fields without the use of the formula
  5133.      formatter.
  5134.  
  5135. <  Case of No Records Found>
  5136. "Case of No Records Found"
  5137.      When no records are found to display.
  5138.  
  5139. <  After Filter and Range Check>
  5140. "After Filter and Range Check"
  5141.      After any record filter or Range limits are evaluated.
  5142.  
  5143. <  Set to First Record>
  5144. "Set to First Record"
  5145.      When using Range Limits, a SET() command is issued to locate
  5146.      the first record. This embedded source code window appears
  5147.      just after the generated SET() command and allows a
  5148.      programmer override of the SET() command.
  5149.  
  5150. <  Set to Last Record>
  5151. "Set to Last Record"
  5152.      When using Range Limits, a SET() command is used to locate
  5153.      the closest match to the last record.  This embedded source
  5154.      code window appears just after the generated SET() command
  5155.      and allows a programmer override of the SET() command.
  5156.  
  5157. <  Process Selected Record>
  5158. "Process Selected Record"
  5159.      When Enable Hot Records has been checked, code within this
  5160.      embedded source window will be executed upon movement of the
  5161.      point bar.  The record under the point bar will be retrieved
  5162.      into memory, any many to one secondary file records will be
  5163.      retrieved and any general formulas will be computed just
  5164.      prior to the insertion of this embedded source code.
  5165.  
  5166. <  End of Procedure>
  5167. "End of Procedure"
  5168.      Code placed in this window executes after all other code in
  5169.      the procedure has executed.  This code begins in column one,
  5170.      therefore you may use this window to write any ROUTINEs which
  5171.      are called from any other embedded source code window.
  5172.  
  5173. <  Prior to Update Procedure>
  5174. "Prior to Update Procedure"
  5175.      Immediately before the Update Procedure is called.
  5176.  
  5177. <  After Update Procedure>
  5178. "After Update Procedure"
  5179.      Immediately after return from the Update Procedure.
  5180.  
  5181. <  When Screen Field is Selected : >
  5182. "When Screen Field is Selected : "
  5183.      In the CASE SELECTED() structure, executed when the field is
  5184.      selected for entry.
  5185.  
  5186. <  When Screen Field is Completed: >
  5187. "When Screen Field is Completed: "
  5188.      In the CASE FIELD() structure, executed when the field has
  5189.      been completed.
  5190.  
  5191. <Formula Classes>
  5192. Formula Classes
  5193.  
  5194. <  LIST >
  5195. LIST
  5196.      A Conditional or Computed Field with "LIST" in the Formula
  5197.      Class field is used for those values which will be displayed
  5198.      in the list box and are only evaluated when the list box item
  5199.      is created.
  5200.  
  5201. <  SUM >
  5202. SUM
  5203.      A Computed Field with "SUM" in the Formula Class field
  5204.      calculates the total of the values contained in the field
  5205.      named in the Expression.  A Conditional Field with "SUM" in
  5206.      the Formula Class field conditionally calculates the total of
  5207.      the values contained in the fields named in the True and
  5208.      False Expressions.
  5209.  
  5210. <  AVG >
  5211. AVG
  5212.      A Computed Field with "AVG" in the Formula Class field
  5213.      calculates the arithmetic mean of the field named in the
  5214.      Expression.  A Conditional Field with "AVG" in the Formula
  5215.      Class field conditionally calculates the arithmetic mean of
  5216.      the fields named in the True and False Expressions.  In both
  5217.      cases, the total value is calculated, then divided by the
  5218.      number of records read to achieve that total.
  5219.  
  5220. <  No class (blank) >
  5221. No class (blank)
  5222.      Calculates the formula every time any field on the screen is
  5223.      completed.  The calculation code is generated before the
  5224.      field setup routines at the top of the processing LOOP.
  5225.  
  5226.  
  5227. <<The View Template>>
  5228. <General Information>
  5229.  
  5230. The View Template displays any ASCII text file in a scrolling
  5231. list box. It is normally used to display a report to the screen
  5232. that was previously written to disk.  The View template may be
  5233. used to create a procedure which is the Next Procedure of a File
  5234. template.  This will allow the user to select a file to view
  5235. from a list of available files.
  5236.  
  5237. The text will scroll up or down using the up and down arrow keys
  5238. or the vertical scroll bar. Pressing the right mouse button in
  5239. the top half of the list box scrolls up and in the bottom half
  5240. scrolls down. Left and right scrolling is supported with END,
  5241. HOME, the horizontal scroll bar, or the left and right arrow
  5242. keys.
  5243.  
  5244. The DOS File definition is defined in the template.  The record
  5245. (one line of the report) is defined with a length of 255.
  5246.  
  5247. If "Progress Indicator" is checked on then a message will be
  5248. displayed to the user while reading the file from disk. This is
  5249. recommended for larger reports to let the user know that the
  5250. program is still active while reading the file from disk.
  5251.  
  5252. While reading the file from disk, the scrolling keys may be used
  5253. (PgUp, PgDn, Up, Dn, etc...) to scroll the queue.  The mouse
  5254. cursor will not be active until the entire file has been read.
  5255.  
  5256. No changes are required in the Screen Formatter or the Data
  5257. Section.  To use the template, just indicate the name of the DOS
  5258. file to display.
  5259.  
  5260. <Formatter Support>
  5261. Formatter Support
  5262.  
  5263. The Screen Formatter is available for this template and is
  5264. preloaded with a default SCREEN.  The LIST box and Exit button
  5265. are required.  The LIST box may be resized or positioned.
  5266.  
  5267. The SCREEN has three pushbuttons:  "Exit," "Print" and "25/50
  5268. Mode."
  5269.  
  5270. The Exit button is required and may not be removed.  The field
  5271. equate label must be ?Exit.
  5272.  
  5273. The Print button prints the file being viewed.  A print device
  5274. field is activated to allow the user to select the output
  5275. device.  If the Print button is deleted, the PrintDevice field
  5276. must also be deleted.
  5277.  
  5278. The 25/50 Mode button attempts to toggle the current text mode
  5279. between 25 and 50 line mode.  The SCREEN will be re-opened in
  5280. the new mode and the listbox will be expanded, since the screen
  5281. structure in the default application file has an EXPAND
  5282. attribute with row 10 identified as the row to duplicate.  Since
  5283. the SETTEXT command is used, the mode will be changed to the
  5284. closest match.  For EGA systems the closest match to 50 line
  5285. mode will be 43 line mode.  This button may be removed from the
  5286. SCREEN structure to disable video mode switching.
  5287.  
  5288. The Report Formatter is not available.
  5289.  
  5290. <Property Fields>
  5291. Property Fields
  5292.  
  5293. <  File to View: >
  5294. File to View:
  5295.      This is the ASCII file to be displayed in the list box. It
  5296.      may be a string constant or a variable. If it is a constant
  5297.      it should be enclosed in 'quotes'. If it is a variable, the
  5298.      variable should be declared in the Global Data Section of the
  5299.      program.
  5300.  
  5301.      When left blank, a variable from the default application is
  5302.      used (GLO:Filespec in CLARION.APP).  This is the same default
  5303.      variable used in the File template.
  5304.  
  5305. <  Warning Size (in K): >
  5306. Warning Size (in K):
  5307.      The View template will read the entire file into a Queue for
  5308.      runtime performance.  However, If you have a file larger than
  5309.      the assigned virtual memory block (Queue elements are saved
  5310.      in virtual by default unless virtual memory support is turned
  5311.      off) the Queue may be written to disk.  This may
  5312.      substantially slow the scrolling of the file.  A warning
  5313.      screen may be displayed when a selected file is larger than
  5314.      a specified size.  This size will be multiplied by 1024 and
  5315.      compared against the actual file size.
  5316.  
  5317. <  Maximum Line Length: >
  5318. Maximum Line Length:
  5319.      Most reports will not be wider than 80 or 132 columns. This
  5320.      allows an opportunity to check for files which do not
  5321.      typically have a carriage return / line feed combination in
  5322.      the first X number of characters.  (like .EXE and .COM files)
  5323.      The number entered here will be used to check the number of
  5324.      bytes in each ASCII file record as it is read.  If a line
  5325.      read has more than the number of characters which are
  5326.      specified as the maximum, an error window will appear and the
  5327.      view will be aborted.  Typically for an .EXE file this will
  5328.      occur in the first record read and no 'garbage' will be
  5329.      displayed in the listbox.  If no Maximum Line Length is
  5330.      entered, the default of 200 is used.
  5331.  
  5332. <  Progress Indicator >
  5333. [√] Progress Indicator
  5334.      If this box is checked on, a message will be displayed to the
  5335.      user while the file is read from disk.
  5336.  
  5337. <  Progress Character:>
  5338. Progress Character:
  5339.      You may enter the ASCII character to be used as the 'bar.'
  5340.      Easy entry of high order ascii characters may be made by
  5341.      using the ASCII value found in the ASCII chart from the Tools
  5342.      menu.  The ASCII value should be surrounded by angle brackets
  5343.      within single quotes.  The Default Application file is
  5344.      preloaded with a shaded bar character '<176>'.
  5345.  
  5346. <Embedded Source>
  5347. Embedded Source
  5348.  
  5349. <  Data Section >
  5350. "Data Section"
  5351.      In the data section of the procedure before local data, the
  5352.      screen and pulldown structures.  This may be used to declare
  5353.      any data which you may want to use only in your embedded
  5354.      source code.
  5355.  
  5356. <  Setup Procedure >
  5357. "Setup Procedure"
  5358.      After the CODE statement.
  5359.  
  5360. <  Setup Screen >
  5361. "Setup Screen"
  5362.      After OPEN(Screen).
  5363.  
  5364. <  Top of Accept Loop>
  5365. "Top of Accept Loop"
  5366.       At the top of the screen field processing loop.
  5367.  
  5368. <  Immediately Before RETURN for non-ASCII file error>
  5369. "Immediately Before RETURN for non-ASCII file error"
  5370.      When the procedure detects that a line is longer than the
  5371.      maximum specified by the Warning Size it returns to the
  5372.      caller with an error message.
  5373.  
  5374. <  After NEXT in RptFile Loop >
  5375. "After NEXT in RptFile Loop"
  5376.      In the loop that read the DOS file from disk, after the NEXT
  5377.      statement.
  5378.  
  5379. <  Immediately After LOOP, before FREE(Queue)>
  5380. "Immediately After LOOP, before FREE(Queue)"
  5381.      After the screen processing loop is complete, indicating the
  5382.      user is finished viewing the text.  The queue still contains
  5383.      the text at this point.
  5384.  
  5385. <  End of Procedure >
  5386. "End of Procedure"
  5387.      Code placed in this window executes after all other code in
  5388.      the procedure has executed.  This code begins in column one,
  5389.      therefore you may use this window to write any ROUTINEs which
  5390.      are called from any other embedded source code window or code
  5391.      that should be execute at the end of the procedure.
  5392.  
  5393. <  When Screen Field is Selected : >
  5394. "When Screen Field is Selected : "
  5395.      In the CASE SELECTED() structure, executed when the field is
  5396.      selected for entry.
  5397.  
  5398. <  When Screen Field is Completed: >
  5399. "When Screen Field is Completed: "
  5400.      In the CASE FIELD() structure, executed when the field has
  5401.      been completed.
  5402.  
  5403. <Formula Classes>
  5404. Formula Classes
  5405.  
  5406. No formula classes are supported by this procedure Template.
  5407. Formula fields are not supported.
  5408.  
  5409.  
  5410.